0

Im trying to deploy INK! 3.3.0 smart contract to my local substrate node and Im getting CodeRejected; Can't decode wasm code.

When I compile my code i get no errors and using the following command to compile and build the smart contract:

cargo +nightly-2022-08-15 contract build

Note:

  • I was able to deploy the contract not long ago, i think its stopped work after i updated rustup nightly.

  • I get no error from the substrate console ./target/release/node-template --dev -l error,debug

Rustc nightly version: rustc 1.67.0-nightly (b3bc6bf31 2022-11-24)

Im using MacBook Pro M1 Pro chip (13.0.1 (22A400) version)

1
  • 1
    I think this may be the issue with new rustc github.com/paritytech/ink/issues/1417, ink 3.3.0 can be build with nightly-2022-06-30 and older, if you want to use the latest rustc then use ink 3.4.0, the issue is fixed there
    – kriko727
    Nov 30, 2022 at 13:41

1 Answer 1

0

Adding --optimization-passes=0 to the contract build command will fix the issue (only a work-a-round until offical fix)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.