Search code examples
scrypto

ERROR: [ resim publish wasm error] : thread 'main' panicked at 'Failed to instantiate WASM module: Instantiation("Function signature does not match")


I am trying to follow the radix beginner bank tutorial:

https://github.com/radixdlt/community-scrypto-examples/tree/main/basic/auction

System spec: Windows 11 (64 bit) Editor: VSCode

Followed the update guideline mentioned in the repo before publishsing the project: https://docs.radixdlt.com/main/scrypto/getting-started/updating-scrypto.html:

    >> rustup update stable
    >> cd radixdlt-scrypto
    >> git pull origin main
    >> cargo install --path ./simulator
    >> resim reset

All of the above commands executed successfully.

But when I try to publish the package using:

`>> resim publish .`

I am getting following error :

    PS C:\KAUSTUBH\DDS\project\community-scrypto-examples\basic\auction> resim publish .
    Compiling auction v0.1.0 (C:\KAUSTUBH\DDS\project\community-scrypto-examples\basic\auction)
    Finished release [optimized] target(s) in 22.76s
thread 'main' panicked at 'Failed to instantiate WASM module: Instantiation("Function signature does not match")', C:\KAUSTUBH\DDS\radix\scryptoc_core\radixdlt-scrypto\radix-engine\src\wasm\wasmi.rs:84:10
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I tried to export a variable

`>> $RUST_BACKTRACE=1`

I tried to publish again but got the same error again


Solution

  • this is happening because the example you are running haven't been updated to the latest Scrypto version