3

Trying to upload contract to node via cli but occur error.

# Run contract-node 
./target/release/substrate-contracts-node --dev --tmp --ws-external --rpc-cors all

# build contract
cargo contract new flipper
cd flipper
cargo contract build --release

# upload contract
cargo contract upload --suri //Alice


>>> ERROR: Metadata: Node metadata is not fully compatible 
    Caused by:
    Node metadata is not fully compatible


>>> ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: i/o error: Transport endpoint is not connected (os error 107); terminate connection: 5


2
  • Is substrate-contracts-node running in the background?
    – Ganesh11
    Feb 26, 2023 at 9:27
  • 1
    update to latest version now working well, thanks Feb 27, 2023 at 6:41

2 Answers 2

1

This is an issue with the versions (check the pallet-contracts version of your substrate-contracts-node ). From this issue on the cargo-contract repository.

The "Node metadata is not fully compatible" means that the instantiate call is not compatible with the version of pallet_contracts you are using.

You can check the substrate documentation guide: Prepare your First Contract to see how to update your environment to the latest versions.

For cargo-contract

cargo install --force --locked cargo-contract --version 2.0.0-rc

Check the version of the pallet_contracts in your node, but if you are using the template contracts node, update it with:

cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag <latest-tag> --force --locked
4
  • thank you for the answer Feb 28, 2023 at 7:05
  • I'm facing the same issue while running latest version, how did you resolve it? Mar 1, 2023 at 18:33
  • updated the answer!
    – Alex Bean
    Mar 2, 2023 at 9:51
  • hi Daan Sorry for the delay in getting back to you. I have reinstalled all involved libraries and nodes and rebuilt. I put in the latest versions of everything. Then it was fixed. Mar 6, 2023 at 13:46
0

I got a similar error ERROR tokio-runtime-worker jsonrpsee_server::transport::ws: WS transport error: i/o error: Transport endpoint is not connected (os error 107); terminate connection: 0. It happened when running Substrate Contracts Node using the latest contracts-ci-linux Dockerfile that I reported here before discovering this post, which uses the latest commit in the 'master' branch of the "cargo-contracts" repo here and the latest commit in the 'main' branch of the "substrate-contracts-node" repo here.

So that was using Substrate Contracts Node version substrate-contracts-node --version of substrate-contracts-node 0.25.0-a2b09462c7c and Cargo Contract version cargo contract --version of cargo-contract-contract 2.2.1-7253c6a-x86_64-unknown-linux-gnu.

I resolved the error by just following https://use.ink/getting-started/setup instructions and updating the Dockerfile so it would install a specific older version substrate-contracts-node (instead of its latest commit) with cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked and by installing the latest stable version of Cargo Contract cargo-contract (instead of the latest commit) with cargo install cargo-contract --version 2.2.1 as shown in my commit here.

Your Answer

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

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