[][src]Function dtoken::use_token_by_agent

pub fn use_token_by_agent(
    account: &Address,
    agent: &Address,
    token_id: &[u8],
    n: U128
) -> bool

use token by agent, the agent of the token has the right to invoke this method

account is the buyer address

agent is the authorized address

resource_id used to mark the only commodity in the chain

token_template_bytes used to mark the only token

n represents the number of consuming token