From 0489a982567cd9657bdf3418520b44db34415d41 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 17 Feb 2020 13:55:51 +0100 Subject: [PATCH] Adapt deploy_erc20.js --- scripts/cosm/deploy_erc20.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/cosm/deploy_erc20.js b/scripts/cosm/deploy_erc20.js index 1420a113..91d6cb1f 100755 --- a/scripts/cosm/deploy_erc20.js +++ b/scripts/cosm/deploy_erc20.js @@ -1,7 +1,7 @@ #!/usr/bin/env node /* eslint-disable @typescript-eslint/camelcase */ -const { CosmWasmClient, Secp256k1Pen } = require("@cosmwasm/sdk"); +const { SigningCosmWasmClient, Secp256k1Pen } = require("@cosmwasm/sdk"); const fs = require("fs"); const httpUrl = "http://localhost:1317"; @@ -56,7 +56,7 @@ const initMsgCash = { async function main() { const pen = await Secp256k1Pen.fromMnemonic(faucet.mnemonic); - const client = CosmWasmClient.makeWritable(httpUrl, faucet.address, signBytes => pen.sign(signBytes)); + const client = new SigningCosmWasmClient(httpUrl, faucet.address, signBytes => pen.sign(signBytes)); const wasm = fs.readFileSync(__dirname + "/contracts/cw-erc20.wasm"); const codeId = await client.upload(wasm, "Upload ERC20 contract");