onflow/cadence-tools

Mint Flow Test helper method

Closed this issue · 0 comments

Issue To Be Solved

When running tests, it's helpful to simply mint Flow to an account. AFAIK, there's not a way to mint flow from the default FlowToken deployment account in emulator, and if there is, it's not straightforward.

Suggest A Solution

Provide a method - something like Test.mintFlow(to: Test.Account) - that makes it dead simple to get an account $FLOW.

An alternative might be to add an initialization param to Blockchain.createAccount() that puts the given amount of Flow into the account.

For reference, flow-js-testing had a similar method mintFlow(recipient, amount)