fn mint_transfer(
        &mut self,
        mint_contract_hash: ContractHash,
        to: Option<AccountHash>,
        source: URef,
        target: URef,
        amount: U512,
        id: Option<u64>,
    ) -> Result<Result<(), mint::Error>, Error> {
        let args_values = {
            let mut runtime_args = RuntimeArgs::new();
            runtime_args.insert(mint::ARG_TO, to)?;
            runtime_args.insert(mint::ARG_SOURCE, source)?;
            runtime_args.insert(mint::ARG_TARGET, target)?;
            runtime_args.insert(mint::ARG_AMOUNT, amount)?;
            runtime_args.insert(mint::ARG_ID, id)?;
            runtime_args
        };

        let gas_counter = self.gas_counter();
        let call_result =
            self.call_contract(mint_contract_hash, mint::METHOD_TRANSFER, args_values);
        self.set_gas_counter(gas_counter);

        Ok(call_result?.into_t()?)
    }
/// Calls the "transfer" method on the mint contract at the given mint
/// contract key
Calls the "transfer" method on the mint contract at the given mint
contract key
Calls the " transfer " method on the mint contract at the given mint contract key
fn mint_transfer(
        &mut self,
        mint_contract_hash: ContractHash,
        to: Option<AccountHash>,
        source: URef,
        target: URef,
        amount: U512,
        id: Option<u64>,
    ) -> Result<Result<(), mint::Error>, Error> {
        let args_values = {
            let mut runtime_args = RuntimeArgs::new();
            runtime_args.insert(mint::ARG_TO, to)?;
            runtime_args.insert(mint::ARG_SOURCE, source)?;
            runtime_args.insert(mint::ARG_TARGET, target)?;
            runtime_args.insert(mint::ARG_AMOUNT, amount)?;
            runtime_args.insert(mint::ARG_ID, id)?;
            runtime_args
        };
        let gas_counter = self.gas_counter();
        let call_result =
            self.call_contract(mint_contract_hash, mint::METHOD_TRANSFER, args_values);
        self.set_gas_counter(gas_counter);
        Ok(call_result?.into_t()?)
    }
fn mint_transfer ( & mut self , mint_contract_hash : ContractHash , to : Option < AccountHash > , source : URef , target : URef , amount : U512 , id : Option < u64 > , ) -> Result < Result < ( ) , mint :: Error > , Error > { let args_values = { let mut runtime_args = RuntimeArgs :: new ( ) ; runtime_args . insert ( mint :: ARG_TO , to ) ? ; runtime_args . insert ( mint :: ARG_SOURCE , source ) ? ; runtime_args . insert ( mint :: ARG_TARGET , target ) ? ; runtime_args . insert ( mint :: ARG_AMOUNT , amount ) ? ; runtime_args . insert ( mint :: ARG_ID , id ) ? ; runtime_args } ; let gas_counter = self . gas_counter ( ) ; let call_result = self . call_contract ( mint_contract_hash , mint :: METHOD_TRANSFER , args_values ) ; self . set_gas_counter ( gas_counter ) ; Ok ( call_result ? . into_t ( ) ? ) }
Calls the "transfer" method on the mint contract at the given mint
contract key
Calls the " transfer " method on the mint contract at the given mint contract key
&mut self
mint_contract_hash
ContractHash
to
Option<AccountHash>
source
URef
target
URef
amount
U512
id
Option<u64>
&mut self
mint_contract_hash
ContractHash
to
Option<AccountHash>
source
URef
target
URef
amount
U512
id
Option<u64>