You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when writing integration tests with the Cadence testing framework, there is no way to send some amount of FLOW tokens to any newly-created account. Since FLOW is the native token of the blockchain, it is a must-have feature to be able to send such tokens to any account, and test relevant scenarios that require usage of FLOW tokens.
Suggest A Solution
Since the emulator is used under the hood for integration tests, one possible solution is to expose the service account to the testing framework. The service account contains a large amount of FLOW tokens, and developers will be able to write transactions and send any desired amount to newly-created accounts. The service account is necessary for signing such transactions. Helper methods might be defined as well, to avoid boilerplate code, and create new accounts with a predefined number of FLOW tokens.
@sideninja Yes, I am using the service key from the Blockchain type, because the account has to be exposed through a custom Test.Account cadence struct. I have already opened a PR that tackles this: #122
Issue To Be Solved
Currently, when writing integration tests with the Cadence testing framework, there is no way to send some amount of FLOW tokens to any newly-created account. Since FLOW is the native token of the blockchain, it is a must-have feature to be able to send such tokens to any account, and test relevant scenarios that require usage of FLOW tokens.
Suggest A Solution
Since the emulator is used under the hood for integration tests, one possible solution is to expose the service account to the testing framework. The service account contains a large amount of FLOW tokens, and developers will be able to write transactions and send any desired amount to newly-created accounts. The service account is necessary for signing such transactions. Helper methods might be defined as well, to avoid boilerplate code, and create new accounts with a predefined number of FLOW tokens.
Context
onflow/developer-grants#148
The text was updated successfully, but these errors were encountered: