We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add msg::value() support: Implement msg::value() to allow contracts in motsu to retrieve the amount of native currency sent with a call.
The amount of value can be set during test contract deployment or invocation, simulating the behavior of real-world transactions.
#[motsu::test] fn test_payable_function(contract:TestContract) { let result = contract.payable_function(); assert_eq!(msg::value(), 1000); }
The text was updated successfully, but these errors were encountered:
Can i take a stab at this
Sorry, something went wrong.
Allow to set sender and set value at macro level
Closing this as duplicate of #12
No branches or pull requests
What is the feature you would like to see?
Add msg::value() support:
Implement msg::value() to allow contracts in motsu to retrieve the amount of native currency sent with a call.
The amount of value can be set during test contract deployment or invocation, simulating the behavior of real-world transactions.
#[motsu::test] fn test_payable_function(contract:TestContract) { let result = contract.payable_function(); assert_eq!(msg::value(), 1000); }
Contribution Guidelines
The text was updated successfully, but these errors were encountered: