FLOW Token Management
Some actions on the network will require an account to have a certain amount of FLOW (tokens) - transaction and storage fees, account creation, etc.
Framework provides a method to query FLOW balances with getFlowBalance
and mint new tokens via mintFlow
.
getFlowBalance(address)
Returns current FLOW token balance of the specified account.
Arguments
Name | Type | Description |
---|---|---|
address | Address | address of the account to check |
Returns
Type | Description |
---|---|
string | UFix64 amount of FLOW tokens stored in account storage |
Usage
mintFlow(recipient, amount)
Sends transaction to mint the specified amount of FLOW and send it to recipient.
⚠️ Required: Framework shall be initialized with
init
method for this method to work.
Arguments
Name | Type | Description |
---|---|---|
recipient | Address | address of the account to check |
amount | string | UFix64 amount of FLOW tokens to mint and send to recipient |
Usage