OffchainLabs / stylus-sdk-rs

Rust Smart Contracts on Arbitrum
222 stars 78 forks source link

stylus check fails for new project #142

Closed javamonn closed 1 month ago

javamonn commented 1 month ago

I created a new project, but cargo stylus check fails against the default counter example - not sure if theres maybe something wrong with my install.

Steps to repro:

cargo stylus new test-stylus
cd test stylus
cargo stylus check

...

contract size: 4.5 KB
wasm size: 13.2 KB
File used for deployment hash: ./Cargo.lock
File used for deployment hash: ./Cargo.toml
File used for deployment hash: ./examples/counter.rs
File used for deployment hash: ./rust-toolchain.toml
File used for deployment hash: ./src/lib.rs
File used for deployment hash: ./src/main.rs
Project hash computed on deployment: "adf328b294dd1fc95909b5c39619a9c0b272bcc496e0c7f8d9ff1de81bc3485d"
contract size: 4.6 KB
Error: stylus checks failed

Caused by:
    program activation failed: failed to parse wasm

    Caused by:
       0: failed to validate user
       1: reference-types not enabled: zero byte expected (at offset 0x1e36)

    Location:
        prover/src/binary.rs:327:10

Other info:

javamonn commented 1 month ago

Closing this as it seems to work fine with a fresh install on a new machine, so not a repo issue. Would still be curious in any assistance in debugging what's wrong with my toolchain setup, though.