-
Notifications
You must be signed in to change notification settings - Fork 729
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
Contracts: Translate .wat fixtures to rust #2654
Conversation
…kadot-sdk into pg/riscv-fixtures
…kadot-sdk into pg/riscv-fixtures
We need to mutate the slice so we need to pass a mutable reference to it
bot fmt |
@pgherveou https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4870587 was started for your command Comment |
@pgherveou Command |
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.
Great work. Thank you.
…racts size" This reverts commit 1ded19f.
The CI pipeline was cancelled due to failure one of the required jobs. |
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.
Great work! I cross checked many of them against the WAT version without finding major issues.
|
||
if !input.is_empty() { | ||
output!(addr, [0u8; 32], api::address,); | ||
api::call_v1( |
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.
The WAT fixture did import seal0::call
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.
Ah yeah bumped it as I believe v0 is deprecated now. We should still work on having all of them covered by tests though
.unwrap(); | ||
} else { | ||
// Try to terminate and give balance to django. | ||
api::terminate_v1(&DJANGO); |
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.
The WAT fixture did import seal0::call
but I don't think it matters here
- Translate all pallet-contracts fixtures from `wat` to Rust files. - Fix read_sandbox_memory_as to not use MaxEncodedLen as this could break if used with types with a non-fixed encoded len. --------- Co-authored-by: alvicsam <[email protected]> Co-authored-by: Alexander Samusev <[email protected]> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: command-bot <>
wat
to Rust files.