diff --git a/scripts/wasmd/deploy_cw1.js b/scripts/wasmd/deploy_cw1.js index e32b035102..41edc6d159 100755 --- a/scripts/wasmd/deploy_cw1.js +++ b/scripts/wasmd/deploy_cw1.js @@ -21,7 +21,7 @@ const codeMeta = { }; async function main() { - const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm"); + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, { prefix: "wasm" }); const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/cw1_subkeys.wasm"); diff --git a/scripts/wasmd/deploy_cw3.js b/scripts/wasmd/deploy_cw3.js index 74369db12e..9cd9c10f12 100755 --- a/scripts/wasmd/deploy_cw3.js +++ b/scripts/wasmd/deploy_cw3.js @@ -63,7 +63,7 @@ const initData = [ ]; async function main() { - const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm"); + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, { prefix: "wasm" }); const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/cw3_fixed_multisig.wasm"); diff --git a/scripts/wasmd/deploy_hackatom.js b/scripts/wasmd/deploy_hackatom.js index a1402c6ea8..613388d503 100755 --- a/scripts/wasmd/deploy_hackatom.js +++ b/scripts/wasmd/deploy_hackatom.js @@ -48,7 +48,7 @@ const inits = [ ]; async function main() { - const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm"); + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, { prefix: "wasm" }); const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/hackatom.wasm"); diff --git a/scripts/wasmd/generate_addresses.js b/scripts/wasmd/generate_addresses.js index ea7dcb3525..763c82cc2f 100755 --- a/scripts/wasmd/generate_addresses.js +++ b/scripts/wasmd/generate_addresses.js @@ -37,7 +37,10 @@ async function main() { for (const { mnemonic, accountNumbers } of accountsToCreate) { const wallets = await Promise.all( accountNumbers.map((accountNumber) => - Secp256k1HdWallet.fromMnemonic(mnemonic, makeCosmoshubPath(accountNumber), prefix), + Secp256k1HdWallet.fromMnemonic(mnemonic, { + hdPath: makeCosmoshubPath(accountNumber), + prefix: prefix, + }), ), ); const accounts = (await Promise.all(wallets.map((wallet) => wallet.getAccounts()))).map( diff --git a/scripts/wasmd/send_first.js b/scripts/wasmd/send_first.js index d8b4c32420..fb6ec96b08 100755 --- a/scripts/wasmd/send_first.js +++ b/scripts/wasmd/send_first.js @@ -16,7 +16,7 @@ const faucet = { }; async function main() { - const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic, undefined, prefix); + const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic, { prefix: prefix }); const client = await SigningStargateClient.connectWithSigner(rpcUrl, wallet); const recipient = Bech32.encode(prefix, Random.getBytes(20)); const amount = coins(226644, "ucosm");