seal_gas_left
should be Weight
(u64), not T::Balance
(u128)
#801
Labels
seal_gas_left
should be Weight
(u64), not T::Balance
(u128)
#801
seal_gas_left should be
Weight
(u64), notT::Balance
(u128)Describe the bug
In ink!, code is:
https://github.com/paritytech/ink/blob/master/crates/env/src/api.rs#L93-L100
the
gas_left
returnT::Balance
. But the default Balance is u128.But in substrate pallet-contracts
https://github.com/paritytech/substrate/blob/master/frame/contracts/src/wasm/runtime.rs#L1070
the
ctx.ext.gas_meter().gas_left()
will returnWeight
, it'su64
.Thus if call seal_gas_left in ink!, must meet decode error.
The text was updated successfully, but these errors were encountered: