From 8d46823ef7afdc2a3b451cfe2ae7febb225bcda8 Mon Sep 17 00:00:00 2001 From: Sabaun Taraki Date: Sun, 3 Dec 2023 20:26:35 +0100 Subject: [PATCH] Fix syscalls signatures --- utils/wasm-instrument/src/syscalls.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/utils/wasm-instrument/src/syscalls.rs b/utils/wasm-instrument/src/syscalls.rs index 0be0c6a5556..0645d71667f 100644 --- a/utils/wasm-instrument/src/syscalls.rs +++ b/utils/wasm-instrument/src/syscalls.rs @@ -367,7 +367,9 @@ impl SyscallName { .into(), ErrPtr::ErrorCode, )), - Self::ReplyPushInput => SyscallSignature::gr_fallible(([Offset, Length].into(), ErrPtr::ErrorCode)), + Self::ReplyPushInput => { + SyscallSignature::gr_fallible(([Offset, Length].into(), ErrPtr::ErrorCode)) + } Self::ReplyTo => { SyscallSignature::gr_fallible(ErrPtr::ErrorWithHash(HashType::MessageId)) } @@ -480,7 +482,9 @@ impl SyscallName { ErrPtr::ErrorWithHash(HashType::MessageId), )), Self::Size => SyscallSignature::gr_infallible([Ptr::MutLength.into()]), - Self::Source => SyscallSignature::gr_infallible([Ptr::Hash(HashType::ActorId).into()]), + Self::Source => { + SyscallSignature::gr_infallible([Ptr::MutHash(HashType::ActorId).into()]) + } Self::Value => SyscallSignature::gr_infallible([Ptr::MutValue.into()]), Self::CreateProgram => SyscallSignature::gr_fallible(( [ @@ -524,7 +528,7 @@ impl SyscallName { ErrPtr::ErrorCode, )), Self::ReserveGas => SyscallSignature::gr_fallible(( - [Gas, DelayBlockNumber].into(), + [Gas, DurationBlockNumber].into(), ErrPtr::ErrorWithHash(HashType::ReservationId), )), Self::UnreserveGas => SyscallSignature::gr_fallible((