-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Contracts: Refactor test builder #4158
Conversation
let message: Xcm<()> = Xcm::builder_unsafe() | ||
.withdraw_asset(assets.clone()) | ||
.deposit_asset(assets, beneficiary) | ||
.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@franciscoaguirre I have refactored my contracts XCM tests to use the new builders.
I am executing an XCM locally here, so I don't really need to buy_execution, is there a better choice than builder_unsafe
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- Moved `substrate/frame/contracts/src/tests/builder.rs` into a pub test_utils module, so we can use that in the `pallet-contracts-mock-network` tests - Refactor xcm tests to use XCM builders, and simplify the use case for xcm-send
substrate/frame/contracts/src/tests/builder.rs
into a pub test_utils module, so we can use that in thepallet-contracts-mock-network
tests