Skip to content

token

Token operations: mint, burn, and approvals.

load token
CommandDescription
token:approveApprove a spender for an ERC20 token allowance.
token:burnBurn tokens from the connected account (ERC20Burnable burn function).
token:burn-fromBurn tokens from another account, consuming the sender allowance (ERC20Burnable burnFrom function).
token:disperseTransfer a token to multiple recipients, encoding one transfer per recipient.
token:mintMint tokens to an account. Calls the mint(address,uint256) function commonly exposed by OpenZeppelin-based ERC20 tokens (usually role- or owner-gated).
token:permitApprove a spender through an EIP-2612 permit signed by the connected wallet, encoded as a permit() call anyone can submit.
token:set-approval-for-allApprove or revoke an operator for all ERC721 or ERC1155 tokens of the connected account.
token:transferTransfer ERC20 tokens from the connected account to a recipient.
token:transfer-fromTransfer ERC20 tokens from one account to another, consuming the sender allowance.
HelperReturnsDescription
@token:allowancenumberFetch the allowance an owner has granted to a spender, in base units.
@token:amountnumberConvert a human-readable token amount to its base unit (applying decimals).
@token:balancenumberFetch the token balance of an address in base units.
@token:decimalsnumberReturn the number of decimals of a token.
@token:formatstringFormat a base-unit token amount as a human-readable string with the token symbol.
@token:symbolstringReturn the symbol of a token.
@token:totalSupplynumberFetch the total supply of a token in base units.