Selaa lähdekoodia

terra: test token_bridge migrate

Change-Id: I4baa721d4aa506a84c8b3ad80e1e9aa35633f975
Reisen 4 vuotta sitten
vanhempi
sitoutus
2a63d08b88
2 muutettua tiedostoa jossa 19 lisäystä ja 1 poistoa
  1. 1 1
      terra/tools/deploy.js
  2. 18 0
      terra/tools/migrate.js

+ 1 - 1
terra/tools/deploy.js

@@ -149,7 +149,7 @@ async function main() {
             gov_chain: govChain,
             gov_address: Buffer.from(govAddress, "hex").toString("base64"),
             wormhole_contract: addresses["wormhole.wasm"],
-            wrapped_asset_code_id: 2,
+            wrapped_asset_code_id: codeIds["cw20_wrapped.wasm"],
           }
         ),
       ],

+ 18 - 0
terra/tools/migrate.js

@@ -72,6 +72,24 @@ async function main() {
     .then((tx) => terra.tx.broadcast(tx))
     .then((rs) => console.log(rs));
 
+  await wallet
+    .createAndSignTx({
+      msgs: [
+        new MsgMigrateContract(
+          wallet.key.accAddress,
+          "terra10pyejy66429refv3g35g2t7am0was7ya7kz2a4",
+          codeIds["token_bridge.wasm"],
+          {
+              "action": ""
+          },
+          { uluna: 1000 }
+        ),
+      ],
+      memo: "",
+    })
+    .then((tx) => terra.tx.broadcast(tx))
+    .then((rs) => console.log(rs));
+
   // Set the Admin to the contract.
   await wallet
     .createAndSignTx({