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 |
…racts size" This reverts commit 1ded19f.
|
The CI pipeline was cancelled due to failure one of the required jobs. |
xermicus
left a comment
There was a problem hiding this comment.
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.
The WAT fixture did import seal0::call
There was a problem hiding this comment.
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.
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 <alvicsam@gmail.com> Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: command-bot <>
watto Rust files.