`ModuleError` out of sync, fails to deserialize `--dry-run` error
Created by: ascjones
Since https://github.com/paritytech/substrate/pull/10242, the error
field on ModuleError
is now a [u8; 4]
, and in the released version of sp_runtime
we depend upon it is still a u8
.
So when we call instantiate/call
with --dry-run
and it triggers a ContractTrapped
or any other internal pallet_contracts
error, the returned error fails to deserialize because of the incompatible ModuleError
types: it expects a u8
but receives a [u8; 4]
.
One solution would be to do a new sp_runtime
release in substrate with the new struct, though that has the downside of not being backwards compatible. But we may not even want to be backwards compatible until contracts are actually on a production chain somewhere.