From dcf7f804b8a618d26fa489eb7893eba5091914f5 Mon Sep 17 00:00:00 2001 From: Joel Smith Date: Tue, 1 Oct 2024 15:26:13 -0500 Subject: [PATCH] Use Helper Function for Store Contract --- wormchain/contracts/tools/deploy_wormchain.ts | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/wormchain/contracts/tools/deploy_wormchain.ts b/wormchain/contracts/tools/deploy_wormchain.ts index c9eb4fd574..39ee0b560d 100644 --- a/wormchain/contracts/tools/deploy_wormchain.ts +++ b/wormchain/contracts/tools/deploy_wormchain.ts @@ -147,20 +147,27 @@ async function main() { }; vaa.signatures = sign(VAA_SIGNERS, vaa as unknown as VAA); console.log("uploading", file); - const msg = client.core.msgStoreCode({ + + let fee = { + amount: [{ amount: "0", denom: "uworm" }], + gas: "10000000", + }; + + const result = await client.core.sendMsgStoreCode({ value: { signer, wasmByteCode: new Uint8Array(contract_bytes), vaa: hexToUint8Array(serialiseVAA(vaa as unknown as VAA)), - } + }, + fee: fee, }); - console.log("store code msg: ", msg); + // console.log("store code msg: ", msg); - const result = await client.signAndBroadcast(signer, [msg], { - ...ZERO_FEE, - gas: "10000000", - }); + // const result = await client.signAndBroadcast(signer, [msg], { + // ...ZERO_FEE, + // gas: "10000000", + // }); console.log("store code result: ", result); @@ -413,7 +420,7 @@ async function main() { } }), client.core.msgCreateAllowlistEntryRequest({ - value: { + value: { signer: signer, address: "wormhole18s5lynnmx37hq4wlrw9gdn68sg2uxp5rwf5k3u", name: "nttAccountantTest",