Ver Fonte

Polkadot: Upgrade substrate contracts node to v0.39.0 (#1631)

Cyrill Leutwiler há 1 ano atrás
pai
commit
5764e01ba9

+ 1 - 1
.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:

+ 2 - 2
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");
 

+ 2 - 2
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 () {

+ 4 - 4
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",