Skip to content

Commit

Permalink
Use Helper Function for Store Contract
Browse files Browse the repository at this point in the history
  • Loading branch information
joelsmith-2019 committed Oct 1, 2024
1 parent 3110dc3 commit dcf7f80
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions wormchain/contracts/tools/deploy_wormchain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,27 @@ async function main() {
};
vaa.signatures = sign(VAA_SIGNERS, vaa as unknown as VAA<Payload>);
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<Payload>)),
}
},
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);

Expand Down Expand Up @@ -413,7 +420,7 @@ async function main() {
}
}),
client.core.msgCreateAllowlistEntryRequest({
value: {
value: {
signer: signer,
address: "wormhole18s5lynnmx37hq4wlrw9gdn68sg2uxp5rwf5k3u",
name: "nttAccountantTest",
Expand Down

0 comments on commit dcf7f80

Please sign in to comment.