From 5764e01ba90482502b453e2277c9414339ed3923 Mon Sep 17 00:00:00 2001 From: Cyrill Leutwiler Date: Thu, 28 Mar 2024 17:46:14 +0100 Subject: [PATCH] Polkadot: Upgrade substrate contracts node to v0.39.0 (#1631) --- .github/workflows/test.yml | 2 +- integration/polkadot/asserts.spec.ts | 4 ++-- integration/polkadot/call_flags.spec.ts | 4 ++-- integration/polkadot/package.json | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a5c8c0ea4..6aa6e424a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -348,7 +348,7 @@ jobs: # We can't run substrate node as a github actions service, since it requires # command line arguments. See https://github.com/actions/runner/pull/1152 - name: Start substrate contracts node - run: echo id=$(docker run -d -p 9944:9944 ghcr.io/hyperledger/solang-substrate-ci:ad6da01 substrate-contracts-node --dev --rpc-external -lwarn,runtime::contracts=trace) >> $GITHUB_OUTPUT + run: echo id=$(docker run -d -p 9944:9944 ghcr.io/hyperledger/solang-substrate-ci:62a8a6c substrate-contracts-node --dev --rpc-external -lwarn,runtime::contracts=trace) >> $GITHUB_OUTPUT id: substrate - uses: actions/download-artifact@v3 with: diff --git a/integration/polkadot/asserts.spec.ts b/integration/polkadot/asserts.spec.ts index 83f300587..586c168c2 100644 --- a/integration/polkadot/asserts.spec.ts +++ b/integration/polkadot/asserts.spec.ts @@ -42,8 +42,8 @@ describe('Deploy asserts contract and test', () => { throw new Error("should not succeed"); }, (res) => res); - // Error 25 is ContractReverted - expect(res2.dispatchError.toHuman()).toEqual({ "Module": { "error": "0x19000000", "index": "8" } }); + // Error 26 is ContractReverted + expect(res2.dispatchError.toHuman()).toEqual({ "Module": { "error": "0x1a000000", "index": "8" } }); let res3 = await query(conn, alice, contract, "var"); diff --git a/integration/polkadot/call_flags.spec.ts b/integration/polkadot/call_flags.spec.ts index 33fed0ad0..d6b5784b0 100644 --- a/integration/polkadot/call_flags.spec.ts +++ b/integration/polkadot/call_flags.spec.ts @@ -54,9 +54,9 @@ describe('Deploy the CallFlags contract and tests for various call flag combinat const flags = [CallFlags.TAIL_CALL]; const answer = await query(conn, alice, contract, "echo", [contract.address, foo, voyager, flags]); const { index, error } = answer.result.asErr.asModule; - // Module 8 error 0x15 is ReentranceDenied in the contracts pallet + // Module 8 error 0x16 is ReentranceDenied in the contracts pallet expect(index.toJSON()).toStrictEqual(8); - expect(error.toJSON()).toStrictEqual("0x15000000"); + expect(error.toJSON()).toStrictEqual("0x16000000"); }); it('fails with the input forwarding flag', async function () { diff --git a/integration/polkadot/package.json b/integration/polkadot/package.json index 6da3cd1d3..d05c2597f 100644 --- a/integration/polkadot/package.json +++ b/integration/polkadot/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "tsc; ts-mocha -t 20000 --exit *.spec.ts", "build": "./build.sh", - "build-ink": "docker run --rm -v $(pwd)/ink/caller:/opt/contract ghcr.io/hyperledger/solang-substrate-ci:ad6da01 cargo contract build --release --manifest-path /opt/contract/Cargo.toml" + "build-ink": "docker run --rm -v $(pwd)/ink/caller:/opt/contract ghcr.io/hyperledger/solang-substrate-ci:62a8a6c cargo contract build --release --manifest-path /opt/contract/Cargo.toml" }, "contributors": [ { @@ -30,10 +30,10 @@ "typescript": "^4.7" }, "dependencies": { - "@polkadot/api": "^10.11", - "@polkadot/api-contract": "^10.11", + "@polkadot/api": "^10.12", + "@polkadot/api-contract": "^10.12", "@polkadot/keyring": "^12.6", - "@polkadot/types": "^10.11", + "@polkadot/types": "^10.12", "@polkadot/util-crypto": "^12.6", "websnark": "git+https://github.com/tornadocash/websnark.git#4c0af6a8b65aabea3c09f377f63c44e7a58afa6d", "snarkjs": "git+https://github.com/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5",