Mint to Address or Contract

We can mint and transfers to an Address or a Contract.

To use the function we must import it.

use std::asset::mint_to;

To mint some amount of an asset we specify the amount that we would like to mint and the Identity to send it to.

    let amount = 10;
    let address = 0x0000000000000000000000000000000000000000000000000000000000000001;
    let user = Identity::Address(Address::from(address));
    let pool = Identity::ContractId(ContractId::from(address));

    mint_to(user, SubId::zero(), amount);
    mint_to(pool, SubId::zero(), amount);