Contracts: Translate .wat fixtures to rust (#2654)

- 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 <>
This commit is contained in:
PG Herveou
2024-01-12 21:10:54 +01:00
committed by GitHub
parent c421b87978
commit bd80dcf685
101 changed files with 2352 additions and 2602 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ macro_rules! define_error_codes {
) => {
/// Every error that can be returned to a contract when it calls any of the host functions.
#[derive(Debug, PartialEq, Eq)]
#[repr(u32)]
#[repr(u8)]
pub enum ReturnErrorCode {
/// API call successful.
Success = 0,