Back to Sway

Mint to Contract

docs/reference/src/documentation/operations/asset/mint/contract.md

0.71.0496 B
Original Source

Mint to Contract

We can mint and transfer the asset to a Contract.

To use the function we must import it.

sway
{{#include ../../../../code/operations/asset_operations/src/lib.sw:mint_to_import}}

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

sway
{{#include ../../../../code/operations/asset_operations/src/lib.sw:mint_to_contract}}