Skip to content
New issue

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

[Feature]: Suport for msg::value() in motsu #7

Closed
1 task done
Ifechukwudaniel opened this issue Oct 12, 2024 · 3 comments
Closed
1 task done

[Feature]: Suport for msg::value() in motsu #7

Ifechukwudaniel opened this issue Oct 12, 2024 · 3 comments

Comments

@Ifechukwudaniel
Copy link

Ifechukwudaniel commented Oct 12, 2024

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

  • I agree to follow this project's Contribution Guidelines
@Ifechukwudaniel
Copy link
Author

Can i take a stab at this

@ggonzalez94 ggonzalez94 transferred this issue from OpenZeppelin/rust-contracts-stylus Dec 17, 2024
@XelHaku
Copy link

XelHaku commented Jan 13, 2025

Allow to set sender and set value at macro level

@0xNeshi
Copy link
Collaborator

0xNeshi commented Jan 14, 2025

Closing this as duplicate of #12

@0xNeshi 0xNeshi closed this as completed Jan 14, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Rust Contracts Stylus Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

3 participants