use-ink / ink-examples

A set of examples for ink! smart contract language. Happy hacking!
https://use.ink
The Unlicense
104 stars 54 forks source link

`ink-examples/set_code_hash` e2e failing #21

Closed peterwht closed 1 year ago

peterwht commented 1 year ago

The e2e test for the set_code_hash example is failing.

When I run the e2e tests with cargo test --features e2e-tests I get the following error:

thread 'incrementer::e2e_tests::set_code_works' panicked at 'error on call `sign_and_submit_then_watch_default`: Encode(Error { context: Context { path: LinkedList(Some(Inner { item: Location { inner: Field("determinism") }, prev: LinkedList(None) })) }, kind: CannotFindVariant { name: "Deterministic", expected: 80 } })', /Users/peterwhite/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ink_e2e-4.2.0/src/xts.rs:318:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test incrementer::e2e_tests::set_code_works ... FAILED

It is panicking at the following lines of code:

            // When
            let new_code_hash = client
                .upload("updated_incrementer", &ink_e2e::alice(), None)
                .await
                .expect("uploading `updated_incrementer` failed")
                .code_hash;
ascjones commented 1 year ago

This should be fixed once the latest cargo-contract is released, and we upgrade the ink_e2e crate.

peterwht commented 1 year ago

Solved with upgrading cargo-contract to version 3.0.0.