浏览代码

chore(contract_manager): add scripts and changes to upgrade wh guardi… (#1468)

* chore(contract_manager): add scripts and changes to upgrade wh guardian set

This change adds `sync_wormhole_guardian_set.ts` script to update all of
our evm and cosmwasm contracts and has a couple of fixes in different
places to make sure everything works fine.

* fix: address review comments
Ali Behjati 1 年之前
父节点
当前提交
481a428e88

+ 1 - 1
contract_manager/package.json

@@ -23,7 +23,7 @@
   "dependencies": {
     "@certusone/wormhole-sdk": "^0.9.8",
     "@coral-xyz/anchor": "^0.29.0",
-    "@injectivelabs/networks": "1.0.68",
+    "@injectivelabs/networks": "^1.14.6",
     "@mysten/sui.js": "^0.49.1",
     "@pythnetwork/cosmwasm-deploy-tools": "*",
     "@pythnetwork/entropy-sdk-solidity": "*",

+ 1 - 1
contract_manager/scripts/common.ts

@@ -72,7 +72,7 @@ export const COMMON_DEPLOY_OPTIONS = {
   chain: {
     type: "array",
     demandOption: true,
-    desc: "Chain to upload the contract on. Can be one of the evm chains available in the store",
+    desc: "Chain to upload the contract on. Can be one of the chains available in the store",
   },
   "deployment-type": {
     type: "string",

+ 69 - 0
contract_manager/scripts/sync_wormhole_guardian_set.ts

@@ -0,0 +1,69 @@
+import yargs from "yargs";
+import { hideBin } from "yargs/helpers";
+import {
+  CosmWasmPriceFeedContract,
+  DefaultStore,
+  EvmPriceFeedContract,
+  toPrivateKey,
+} from "../src";
+
+const parser = yargs(hideBin(process.argv))
+  .usage("Update the guardian set in stable networks. Usage: $0")
+  .options({
+    "private-key": {
+      type: "string",
+      demandOption: true,
+      desc: "Private key to sign the transactions with",
+    },
+    chain: {
+      type: "array",
+      desc: "Can be one of the chains available in the store",
+    },
+  });
+
+async function main() {
+  const argv = await parser.argv;
+
+  const privateKey = toPrivateKey(argv.privateKey);
+  const chains = argv.chain;
+
+  for (const contract of Object.values(DefaultStore.contracts)) {
+    // We are currently only managing wormhole receiver contracts in EVM and
+    // CosmWasm and Solana-based networks. The rest of the networks are
+    // managed by the guardians themselves and they should be the ones updating
+    // the guardian set.
+    // TODO: Solana-based receivers have their script in their rust cli. Add
+    // support for Solana-based networks here once they are added to the
+    // contract manager.
+    if (
+      contract instanceof CosmWasmPriceFeedContract ||
+      contract instanceof EvmPriceFeedContract
+    ) {
+      if (chains && !chains.includes(contract.getChain().getId())) {
+        continue;
+      }
+
+      try {
+        console.log("------------------------------------");
+        const wormhole = await contract.getWormholeContract();
+
+        // TODO: This is a temporary workaround to skip contracts that are in beta channel
+        // We should have a better way to handle this
+        if ((await wormhole.getCurrentGuardianSetIndex()) === 0) {
+          continue;
+        }
+
+        console.log(
+          `Current Guardianset for ${contract.getId()}: ${await wormhole.getCurrentGuardianSetIndex()}`
+        );
+
+        await wormhole.syncMainnetGuardianSets(privateKey);
+        console.log(`Updated Guardianset for ${contract.getId()}`);
+      } catch (e) {
+        console.error(`Error updating Guardianset for ${contract.getId()}`, e);
+      }
+    }
+  }
+}
+
+main();

+ 2 - 3
contract_manager/src/chains.ts

@@ -408,11 +408,10 @@ export class EvmChain extends Chain {
     const GAS_ESTIMATE_MULTIPLIER = 2;
     const gasEstimate = await transactionObject.estimateGas(txParams);
     // Some networks like Filecoin do not support the normal transaction type and need a type 2 transaction.
-    // To send a type 2 transaction, remove the ``gasPrice`` field and add the `type` field with the value
-    // `0x2` to the transaction configuration parameters.
+    // To send a type 2 transaction, remove the ``gasPrice`` field.
     return transactionObject.send({
       gas: gasEstimate * GAS_ESTIMATE_MULTIPLIER,
-      gasPrice: await this.getGasPrice(),
+      gasPrice: Number(await this.getGasPrice()),
       ...txParams,
     });
   }

+ 3 - 1
contract_manager/src/contracts/cosmwasm.ts

@@ -211,7 +211,9 @@ export class CosmWasmPriceFeedContract extends PriceFeedContract {
     })) as Record<string, string>;
     const config = {
       config_v1: JSON.parse(allStates["\x00\tconfig_v1"]),
-      contract_version: JSON.parse(allStates["\x00\x10contract_version"]),
+      contract_version: allStates["\x00\x10contract_version"]
+        ? JSON.parse(allStates["\x00\x10contract_version"])
+        : undefined,
     };
     return config;
   }

文件差异内容过多而无法显示
+ 0 - 0
contract_manager/src/contracts/wormhole.ts


+ 8 - 18
contract_manager/store/chains/EvmChains.yaml

@@ -39,11 +39,6 @@
   rpcUrl: https://evm-t3.cronos.org
   networkId: 338
   type: EvmChain
-- id: zksync_goerli
-  mainnet: false
-  rpcUrl: https://zksync2-testnet.zksync.dev
-  networkId: 280
-  type: EvmChain
 - id: canto_testnet
   mainnet: false
   rpcUrl: https://canto-testnet.plexnode.wtf
@@ -51,7 +46,7 @@
   type: EvmChain
 - id: polygon_zkevm_testnet
   mainnet: false
-  rpcUrl: https://rpc.public.zkevm-test.net/
+  rpcUrl: https://rpc.public.zkevm-test.net
   networkId: 1442
   type: EvmChain
 - id: polygon_blackberry
@@ -82,7 +77,7 @@
   type: EvmChain
 - id: neon
   mainnet: true
-  rpcUrl: https://neon-proxy-mainnet.solana.p2p.org
+  rpcUrl: https://neon-evm.drpc.org
   networkId: 245022934
   type: EvmChain
 - id: fantom
@@ -174,11 +169,6 @@
   rpcUrl: https://evm.confluxrpc.org
   networkId: 1030
   type: EvmChain
-- id: optimism_goerli
-  mainnet: false
-  rpcUrl: https://rpc.ankr.com/optimism_testnet
-  networkId: 420
-  type: EvmChain
 - id: celo
   mainnet: true
   rpcUrl: https://forno.celo.org
@@ -289,7 +279,7 @@
   type: EvmChain
 - id: horizen_eon
   mainnet: true
-  rpcUrl: https://eon-rpc.horizenlabs.io/ethv1
+  rpcUrl: https://rpc.ankr.com/horizen_eon
   networkId: 7332
   type: EvmChain
 - id: horizen_gobi
@@ -334,7 +324,7 @@
   type: EvmChain
 - id: manta_testnet
   mainnet: false
-  rpcUrl: https://pacific-rpc.testnet.manta.network/http
+  rpcUrl: https://manta-pacific-testnet.drpc.org
   networkId: 3441005
   type: EvmChain
 - id: manta_sepolia
@@ -393,14 +383,14 @@
   networkId: 1116
   type: EvmChain
   nativeToken: CORE
-- id: tomochain
+- id: viction
   mainnet: true
-  rpcUrl: https://rpc.tomochain.com
+  rpcUrl: https://viction.blockpi.network/v1/rpc/public
   networkId: 88
   type: EvmChain
-- id: tomochain_testnet
+- id: viction_testnet
   mainnet: false
-  rpcUrl: https://rpc.testnet.tomochain.com
+  rpcUrl: https://rpc-testnet.viction.xyz
   networkId: 89
   type: EvmChain
 - id: mode_testnet

+ 1 - 10
contract_manager/store/contracts/EvmPriceFeedContracts.yaml

@@ -97,7 +97,7 @@
 - chain: coredao
   address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
   type: EvmPriceFeedContract
-- chain: tomochain
+- chain: viction
   address: "0xA2aa501b19aff244D90cc15a4Cf739D2725B5729"
   type: EvmPriceFeedContract
 - chain: arbitrum_sepolia
@@ -142,9 +142,6 @@
 - chain: meter_testnet
   address: "0x5a71C07a0588074443545eE0c08fb0375564c3E4"
   type: EvmPriceFeedContract
-- chain: optimism_goerli
-  address: "0xDd24F84d36BF92C65F92307595335bdFab5Bbd21"
-  type: EvmPriceFeedContract
 - chain: shimmer_testnet
   address: "0x8D254a21b3C86D32F7179855531CE99164721933"
   type: EvmPriceFeedContract
@@ -169,9 +166,6 @@
 - chain: coredao_testnet
   address: "0x8D254a21b3C86D32F7179855531CE99164721933"
   type: EvmPriceFeedContract
-- chain: tomochain_testnet
-  address: "0x5D289Ad1CE59fCC25b6892e7A303dfFf3a9f7167"
-  type: EvmPriceFeedContract
 - chain: cronos_testnet
   address: "0x36825bf3Fbdf5a29E2d5148bfe7Dcf7B5639e320"
   type: EvmPriceFeedContract
@@ -202,9 +196,6 @@
 - chain: neon_devnet
   address: "0x0708325268dF9F66270F1401206434524814508b"
   type: EvmPriceFeedContract
-- chain: zksync_goerli
-  address: "0x8739d5024B5143278E2b15Bd9e7C26f6CEc658F1"
-  type: EvmPriceFeedContract
 - chain: optimism_sepolia
   address: "0x0708325268dF9F66270F1401206434524814508b"
   type: EvmPriceFeedContract

+ 2 - 2
governance/xc_admin/packages/xc_admin_common/src/chains.ts

@@ -53,7 +53,7 @@ export const RECEIVER_CHAINS = {
   zetachain: 60034,
   astar_zkevm: 60035,
   coredao: 60036,
-  tomochain: 60037,
+  viction: 60037,
   stacks: 60038,
   mode: 60039,
   bttc: 60040,
@@ -111,7 +111,7 @@ export const RECEIVER_CHAINS = {
   zetachain_testnet: 50035,
   astar_zkevm_testnet: 50036,
   coredao_testnet: 50037,
-  tomochain_testnet: 50038,
+  viction_testnet: 50038,
   stacks_testnet: 50039,
   mode_testnet: 50040,
   bttc_testnet: 50041,

+ 93 - 65
package-lock.json

@@ -832,7 +832,7 @@
       "dependencies": {
         "@certusone/wormhole-sdk": "^0.9.8",
         "@coral-xyz/anchor": "^0.29.0",
-        "@injectivelabs/networks": "1.0.68",
+        "@injectivelabs/networks": "^1.14.6",
         "@mysten/sui.js": "^0.49.1",
         "@pythnetwork/cosmwasm-deploy-tools": "*",
         "@pythnetwork/entropy-sdk-solidity": "*",
@@ -1087,18 +1087,43 @@
       "optional": true
     },
     "contract_manager/node_modules/@injectivelabs/networks": {
-      "version": "1.0.68",
-      "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.68.tgz",
-      "integrity": "sha512-CcWcLaRX1lJQyYs97+PPDmMaEFcXQgt/WjQ5raamcbQugJwMa/byC4eS18DZ0tIIZ24CoD+79zbgHDzfoe6/qg==",
+      "version": "1.14.6",
+      "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.6.tgz",
+      "integrity": "sha512-O1IkPFJl8ThNL6N+k/9OimrgCYsSWQ8A1FtVMXSQge+0QRZsDKSpRmQRwE601otXXauO31nOUct5AaiWPffXVQ==",
       "hasInstallScript": true,
       "dependencies": {
-        "@injectivelabs/exceptions": "^1.0.42",
-        "@injectivelabs/ts-types": "^1.0.27",
-        "@injectivelabs/utils": "^1.0.59",
+        "@injectivelabs/exceptions": "^1.14.6",
+        "@injectivelabs/ts-types": "^1.14.6",
+        "@injectivelabs/utils": "^1.14.6",
         "link-module-alias": "^1.2.0",
         "shx": "^0.3.2"
       }
     },
+    "contract_manager/node_modules/@injectivelabs/networks/node_modules/@injectivelabs/utils": {
+      "version": "1.14.6",
+      "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.14.6.tgz",
+      "integrity": "sha512-5I0h4GiLB5PPTl+g2lpevRP+WScvEbntdkoUQVtAdHewl4kutd5p1Kcnoi1Nvpq+sz5N/e9qtBIRuyxG38akOg==",
+      "hasInstallScript": true,
+      "dependencies": {
+        "@injectivelabs/exceptions": "^1.14.6",
+        "@injectivelabs/ts-types": "^1.14.6",
+        "axios": "^0.21.1",
+        "bignumber.js": "^9.0.1",
+        "http-status-codes": "^2.2.0",
+        "link-module-alias": "^1.2.0",
+        "shx": "^0.3.2",
+        "snakecase-keys": "^5.1.2",
+        "store2": "^2.12.0"
+      }
+    },
+    "contract_manager/node_modules/@injectivelabs/networks/node_modules/axios": {
+      "version": "0.21.4",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+      "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+      "dependencies": {
+        "follow-redirects": "^1.14.0"
+      }
+    },
     "contract_manager/node_modules/@injectivelabs/sdk-ts": {
       "version": "1.10.72",
       "resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.10.72.tgz",
@@ -1144,20 +1169,6 @@
         "snakecase-keys": "^5.4.1"
       }
     },
-    "contract_manager/node_modules/@injectivelabs/sdk-ts/node_modules/@injectivelabs/networks": {
-      "version": "1.11.0",
-      "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.11.0.tgz",
-      "integrity": "sha512-0dtO/zZ8AzsxGInEWZ7tpOA0Q++M3FhAFxOWzhYC39ZeJlwHhEcYmvmhrGG5gRdus29XfFysRlaz3hyT3XH1Jg==",
-      "hasInstallScript": true,
-      "optional": true,
-      "dependencies": {
-        "@injectivelabs/exceptions": "^1.11.0",
-        "@injectivelabs/ts-types": "^1.11.0",
-        "@injectivelabs/utils": "^1.11.0",
-        "link-module-alias": "^1.2.0",
-        "shx": "^0.3.2"
-      }
-    },
     "contract_manager/node_modules/@injectivelabs/sdk-ts/node_modules/@injectivelabs/utils": {
       "version": "1.11.0",
       "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.11.0.tgz",
@@ -1200,6 +1211,7 @@
       "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.10.12.tgz",
       "integrity": "sha512-c8al79nxIJgV1cBAdW2TPDGldj/8gm5k0h5TIN/AJs8/AeIjpTwwVGfLY3QvPOpRsxuQ9CjBkTXrAcSL1wwkcw==",
       "hasInstallScript": true,
+      "optional": true,
       "dependencies": {
         "@injectivelabs/exceptions": "^1.10.12",
         "@injectivelabs/ts-types": "^1.10.12",
@@ -1216,6 +1228,7 @@
       "version": "0.21.4",
       "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
       "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+      "optional": true,
       "dependencies": {
         "follow-redirects": "^1.14.0"
       }
@@ -57958,7 +57971,7 @@
         "@cosmjs/cosmwasm-stargate": "^0.29.5",
         "@cosmjs/encoding": "^0.26.2",
         "@cosmjs/proto-signing": "^0.30.1",
-        "@injectivelabs/networks": "1.0.68",
+        "@injectivelabs/networks": "^1.14.6",
         "@injectivelabs/sdk-ts": "1.0.354",
         "@ltd/j-toml": "^1.38.0",
         "@pythnetwork/price-service-client": "*",
@@ -58112,14 +58125,14 @@
       }
     },
     "target_chains/cosmwasm/tools/node_modules/@injectivelabs/networks": {
-      "version": "1.0.68",
-      "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.68.tgz",
-      "integrity": "sha512-CcWcLaRX1lJQyYs97+PPDmMaEFcXQgt/WjQ5raamcbQugJwMa/byC4eS18DZ0tIIZ24CoD+79zbgHDzfoe6/qg==",
+      "version": "1.14.6",
+      "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.6.tgz",
+      "integrity": "sha512-O1IkPFJl8ThNL6N+k/9OimrgCYsSWQ8A1FtVMXSQge+0QRZsDKSpRmQRwE601otXXauO31nOUct5AaiWPffXVQ==",
       "hasInstallScript": true,
       "dependencies": {
-        "@injectivelabs/exceptions": "^1.0.42",
-        "@injectivelabs/ts-types": "^1.0.27",
-        "@injectivelabs/utils": "^1.0.59",
+        "@injectivelabs/exceptions": "^1.14.6",
+        "@injectivelabs/ts-types": "^1.14.6",
+        "@injectivelabs/utils": "^1.14.6",
         "link-module-alias": "^1.2.0",
         "shx": "^0.3.2"
       }
@@ -58243,13 +58256,13 @@
       }
     },
     "target_chains/cosmwasm/tools/node_modules/@injectivelabs/utils": {
-      "version": "1.10.12",
-      "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.10.12.tgz",
-      "integrity": "sha512-c8al79nxIJgV1cBAdW2TPDGldj/8gm5k0h5TIN/AJs8/AeIjpTwwVGfLY3QvPOpRsxuQ9CjBkTXrAcSL1wwkcw==",
+      "version": "1.14.6",
+      "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.14.6.tgz",
+      "integrity": "sha512-5I0h4GiLB5PPTl+g2lpevRP+WScvEbntdkoUQVtAdHewl4kutd5p1Kcnoi1Nvpq+sz5N/e9qtBIRuyxG38akOg==",
       "hasInstallScript": true,
       "dependencies": {
-        "@injectivelabs/exceptions": "^1.10.12",
-        "@injectivelabs/ts-types": "^1.10.12",
+        "@injectivelabs/exceptions": "^1.14.6",
+        "@injectivelabs/ts-types": "^1.14.6",
         "axios": "^0.21.1",
         "bignumber.js": "^9.0.1",
         "http-status-codes": "^2.2.0",
@@ -67292,7 +67305,7 @@
         "@cosmjs/cosmwasm-stargate": "^0.29.5",
         "@cosmjs/encoding": "^0.26.2",
         "@cosmjs/proto-signing": "^0.30.1",
-        "@injectivelabs/networks": "1.0.68",
+        "@injectivelabs/networks": "^1.14.6",
         "@injectivelabs/sdk-ts": "1.0.354",
         "@ltd/j-toml": "^1.38.0",
         "@pythnetwork/price-service-client": "*",
@@ -67449,13 +67462,13 @@
           }
         },
         "@injectivelabs/networks": {
-          "version": "1.0.68",
-          "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.68.tgz",
-          "integrity": "sha512-CcWcLaRX1lJQyYs97+PPDmMaEFcXQgt/WjQ5raamcbQugJwMa/byC4eS18DZ0tIIZ24CoD+79zbgHDzfoe6/qg==",
+          "version": "1.14.6",
+          "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.6.tgz",
+          "integrity": "sha512-O1IkPFJl8ThNL6N+k/9OimrgCYsSWQ8A1FtVMXSQge+0QRZsDKSpRmQRwE601otXXauO31nOUct5AaiWPffXVQ==",
           "requires": {
-            "@injectivelabs/exceptions": "^1.0.42",
-            "@injectivelabs/ts-types": "^1.0.27",
-            "@injectivelabs/utils": "^1.0.59",
+            "@injectivelabs/exceptions": "^1.14.6",
+            "@injectivelabs/ts-types": "^1.14.6",
+            "@injectivelabs/utils": "^1.14.6",
             "link-module-alias": "^1.2.0",
             "shx": "^0.3.2"
           }
@@ -67582,12 +67595,12 @@
           }
         },
         "@injectivelabs/utils": {
-          "version": "1.10.12",
-          "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.10.12.tgz",
-          "integrity": "sha512-c8al79nxIJgV1cBAdW2TPDGldj/8gm5k0h5TIN/AJs8/AeIjpTwwVGfLY3QvPOpRsxuQ9CjBkTXrAcSL1wwkcw==",
+          "version": "1.14.6",
+          "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.14.6.tgz",
+          "integrity": "sha512-5I0h4GiLB5PPTl+g2lpevRP+WScvEbntdkoUQVtAdHewl4kutd5p1Kcnoi1Nvpq+sz5N/e9qtBIRuyxG38akOg==",
           "requires": {
-            "@injectivelabs/exceptions": "^1.10.12",
-            "@injectivelabs/ts-types": "^1.10.12",
+            "@injectivelabs/exceptions": "^1.14.6",
+            "@injectivelabs/ts-types": "^1.14.6",
             "axios": "^0.21.1",
             "bignumber.js": "^9.0.1",
             "http-status-codes": "^2.2.0",
@@ -81237,7 +81250,7 @@
       "requires": {
         "@certusone/wormhole-sdk": "^0.9.8",
         "@coral-xyz/anchor": "^0.29.0",
-        "@injectivelabs/networks": "1.0.68",
+        "@injectivelabs/networks": "^1.14.6",
         "@mysten/sui.js": "^0.49.1",
         "@pythnetwork/cosmwasm-deploy-tools": "*",
         "@pythnetwork/entropy-sdk-solidity": "*",
@@ -81487,15 +81500,41 @@
           "optional": true
         },
         "@injectivelabs/networks": {
-          "version": "1.0.68",
-          "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.0.68.tgz",
-          "integrity": "sha512-CcWcLaRX1lJQyYs97+PPDmMaEFcXQgt/WjQ5raamcbQugJwMa/byC4eS18DZ0tIIZ24CoD+79zbgHDzfoe6/qg==",
+          "version": "1.14.6",
+          "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.6.tgz",
+          "integrity": "sha512-O1IkPFJl8ThNL6N+k/9OimrgCYsSWQ8A1FtVMXSQge+0QRZsDKSpRmQRwE601otXXauO31nOUct5AaiWPffXVQ==",
           "requires": {
-            "@injectivelabs/exceptions": "^1.0.42",
-            "@injectivelabs/ts-types": "^1.0.27",
-            "@injectivelabs/utils": "^1.0.59",
+            "@injectivelabs/exceptions": "^1.14.6",
+            "@injectivelabs/ts-types": "^1.14.6",
+            "@injectivelabs/utils": "^1.14.6",
             "link-module-alias": "^1.2.0",
             "shx": "^0.3.2"
+          },
+          "dependencies": {
+            "@injectivelabs/utils": {
+              "version": "1.14.6",
+              "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.14.6.tgz",
+              "integrity": "sha512-5I0h4GiLB5PPTl+g2lpevRP+WScvEbntdkoUQVtAdHewl4kutd5p1Kcnoi1Nvpq+sz5N/e9qtBIRuyxG38akOg==",
+              "requires": {
+                "@injectivelabs/exceptions": "^1.14.6",
+                "@injectivelabs/ts-types": "^1.14.6",
+                "axios": "^0.21.1",
+                "bignumber.js": "^9.0.1",
+                "http-status-codes": "^2.2.0",
+                "link-module-alias": "^1.2.0",
+                "shx": "^0.3.2",
+                "snakecase-keys": "^5.1.2",
+                "store2": "^2.12.0"
+              }
+            },
+            "axios": {
+              "version": "0.21.4",
+              "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+              "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+              "requires": {
+                "follow-redirects": "^1.14.0"
+              }
+            }
           }
         },
         "@injectivelabs/sdk-ts": {
@@ -81542,19 +81581,6 @@
             "snakecase-keys": "^5.4.1"
           },
           "dependencies": {
-            "@injectivelabs/networks": {
-              "version": "1.11.0",
-              "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.11.0.tgz",
-              "integrity": "sha512-0dtO/zZ8AzsxGInEWZ7tpOA0Q++M3FhAFxOWzhYC39ZeJlwHhEcYmvmhrGG5gRdus29XfFysRlaz3hyT3XH1Jg==",
-              "optional": true,
-              "requires": {
-                "@injectivelabs/exceptions": "^1.11.0",
-                "@injectivelabs/ts-types": "^1.11.0",
-                "@injectivelabs/utils": "^1.11.0",
-                "link-module-alias": "^1.2.0",
-                "shx": "^0.3.2"
-              }
-            },
             "@injectivelabs/utils": {
               "version": "1.11.0",
               "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.11.0.tgz",
@@ -81599,6 +81625,7 @@
           "version": "1.10.12",
           "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.10.12.tgz",
           "integrity": "sha512-c8al79nxIJgV1cBAdW2TPDGldj/8gm5k0h5TIN/AJs8/AeIjpTwwVGfLY3QvPOpRsxuQ9CjBkTXrAcSL1wwkcw==",
+          "optional": true,
           "requires": {
             "@injectivelabs/exceptions": "^1.10.12",
             "@injectivelabs/ts-types": "^1.10.12",
@@ -81615,6 +81642,7 @@
               "version": "0.21.4",
               "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
               "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+              "optional": true,
               "requires": {
                 "follow-redirects": "^1.14.0"
               }

+ 4 - 4
target_chains/cosmwasm/tools/package.json

@@ -14,10 +14,10 @@
     "@cosmjs/cosmwasm-stargate": "^0.29.5",
     "@cosmjs/encoding": "^0.26.2",
     "@cosmjs/proto-signing": "^0.30.1",
-    "@injectivelabs/networks": "1.0.68",
+    "@injectivelabs/networks": "^1.14.6",
     "@injectivelabs/sdk-ts": "1.0.354",
     "@ltd/j-toml": "^1.38.0",
-    "xc_admin_common": "*",
+    "@pythnetwork/price-service-client": "*",
     "@terra-money/terra.js": "^3.1.3",
     "adm-zip": "^0.5.10",
     "chain-registry": "^1.6.0",
@@ -26,8 +26,8 @@
     "ethers": "^5.4.4",
     "node-downloader-helper": "^2.1.7",
     "osmojs": "^13.0.0-rc.7-i-alpha",
-    "yargs": "^17.0.1",
-    "@pythnetwork/price-service-client": "*"
+    "xc_admin_common": "*",
+    "yargs": "^17.0.1"
   },
   "devDependencies": {
     "@types/adm-zip": "^0.5.0",

+ 7 - 1
target_chains/cosmwasm/tools/src/ci/deployer/injective.ts

@@ -37,7 +37,13 @@ export class InjectiveDeployer implements Deployer {
 
   private async signAndBroadcastMsg(
     msg: Msgs,
-    fee = DEFAULT_STD_FEE
+    fee: {
+      amount: {
+        amount: string;
+        denom: string;
+      }[];
+      gas: string;
+    } = DEFAULT_STD_FEE
   ): Promise<TxResponse> {
     const networkInfo = getNetworkInfo(this.network);
 

部分文件因为文件数量过多而无法显示