cargo-contract icon indicating copy to clipboard operation
cargo-contract copied to clipboard

Support for `AccountId20` type

Open JoshOrndorff opened this issue 2 years ago • 1 comments

I am working on a chain for the PBA where we would like to use both evm and pallet contracts. We have chosen to use the ethereum style AccountId20 type for the entire Substrate runtime. Luckily pallet contracts is generic over the account id and handles this properly.

However, it seems that cargo contract assumes the chain will use AccountId32. For example, here is one place I see it https://github.com/paritytech/cargo-contract/blob/master/crates/cargo-contract/src/cmd/extrinsics/instantiate.rs#L332

Is it possible to generalize cargo contract to work with AccoutId20?

JoshOrndorff avatar Jun 27 '23 18:06 JoshOrndorff

Here is my best attempt so far https://github.com/paritytech/cargo-contract/pull/1186

JoshOrndorff avatar Jun 28 '23 17:06 JoshOrndorff