diff --git a/scripts/wasmd/deploy_erc20.js b/scripts/wasmd/deploy_erc20.js index 140b5b06..edd912a6 100755 --- a/scripts/wasmd/deploy_erc20.js +++ b/scripts/wasmd/deploy_erc20.js @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/camelcase */ const { SigningCosmWasmClient } = require("@cosmjs/cosmwasm"); -const { Secp256k1Pen } = require("@cosmjs/sdk38"); +const { Secp256k1OfflineWallet } = require("@cosmjs/sdk38"); const fs = require("fs"); const httpUrl = "http://localhost:1317"; @@ -134,8 +134,8 @@ const initDataJade = { }; async function main() { - const pen = await Secp256k1Pen.fromMnemonic(alice.mnemonic); - const client = new SigningCosmWasmClient(httpUrl, alice.address0, (signBytes) => pen.sign(signBytes)); + const wallet = await Secp256k1OfflineWallet.fromMnemonic(alice.mnemonic); + const client = new SigningCosmWasmClient(httpUrl, alice.address0, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/cw-erc20.wasm"); const uploadReceipt = await client.upload(wasm, codeMeta, "Upload ERC20 contract"); diff --git a/scripts/wasmd/deploy_nameservice.js b/scripts/wasmd/deploy_nameservice.js index 3f7ad0d1..21853214 100755 --- a/scripts/wasmd/deploy_nameservice.js +++ b/scripts/wasmd/deploy_nameservice.js @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/camelcase */ const { SigningCosmWasmClient } = require("@cosmjs/cosmwasm"); -const { Secp256k1Pen } = require("@cosmjs/sdk38"); +const { Secp256k1OfflineWallet } = require("@cosmjs/sdk38"); const fs = require("fs"); const httpUrl = "http://localhost:1317"; @@ -36,8 +36,8 @@ const luxury = { }; async function main() { - const pen = await Secp256k1Pen.fromMnemonic(alice.mnemonic); - const client = new SigningCosmWasmClient(httpUrl, alice.address0, (signBytes) => pen.sign(signBytes)); + const wallet = await Secp256k1OfflineWallet.fromMnemonic(alice.mnemonic); + const client = new SigningCosmWasmClient(httpUrl, alice.address0, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/cw-nameservice.wasm"); const uploadReceipt = await client.upload(wasm, codeMeta, "Upload Name Service code"); diff --git a/scripts/wasmd/deploy_staking.js b/scripts/wasmd/deploy_staking.js index 43ae93e5..a1bb7926 100755 --- a/scripts/wasmd/deploy_staking.js +++ b/scripts/wasmd/deploy_staking.js @@ -2,7 +2,7 @@ /* eslint-disable @typescript-eslint/camelcase */ const { SigningCosmWasmClient } = require("@cosmjs/cosmwasm"); -const { coins, Secp256k1Pen } = require("@cosmjs/sdk38"); +const { coins, Secp256k1OfflineWallet } = require("@cosmjs/sdk38"); const fs = require("fs"); const httpUrl = "http://localhost:1317"; @@ -38,8 +38,8 @@ const fees = { }; async function main() { - const pen = await Secp256k1Pen.fromMnemonic(alice.mnemonic); - const client = new SigningCosmWasmClient(httpUrl, alice.address0, (signBytes) => pen.sign(signBytes), fees); + const wallet = await Secp256k1OfflineWallet.fromMnemonic(alice.mnemonic); + const client = new SigningCosmWasmClient(httpUrl, alice.address0, wallet, fees); const wasm = fs.readFileSync(__dirname + "/contracts/staking.wasm"); const uploadReceipt = await client.upload(wasm, codeMeta, "Upload Staking code");