From d754520ce6e09cc841b4042bda90bb1c4620243b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 12 Jan 2021 16:14:25 +0100 Subject: [PATCH] Rename connectWithWallet -> connectWithSigner --- .../src/cosmwasmclient.spec.ts | 4 +-- .../src/queries/wasm.spec.ts | 6 ++-- .../src/signingcosmwasmclient.spec.ts | 34 +++++++++---------- .../src/signingcosmwasmclient.ts | 2 +- .../types/signingcosmwasmclient.d.ts | 2 +- packages/faucet/src/profile.ts | 2 +- .../src/signingstargateclient.spec.ts | 20 +++++------ .../stargate/src/signingstargateclient.ts | 2 +- .../stargate/types/signingstargateclient.d.ts | 2 +- scripts/wasmd/deploy_cw1.js | 2 +- scripts/wasmd/deploy_cw3.js | 2 +- scripts/wasmd/deploy_erc20.js | 2 +- scripts/wasmd/deploy_hackatom.js | 2 +- scripts/wasmd/send_first.js | 2 +- 14 files changed, 42 insertions(+), 42 deletions(-) diff --git a/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts b/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts index 4fc6f67c..2483fc28 100644 --- a/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts +++ b/packages/cosmwasm-stargate/src/cosmwasmclient.spec.ts @@ -337,7 +337,7 @@ describe("CosmWasmClient", () => { beforeAll(async () => { if (wasmdEnabled()) { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); const initMsg = { verifier: makeRandomAddress(), beneficiary: makeRandomAddress() }; const { contractAddress } = await client.instantiate( @@ -392,7 +392,7 @@ describe("CosmWasmClient", () => { beforeAll(async () => { if (wasmdEnabled()) { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); const initMsg = { verifier: makeRandomAddress(), beneficiary: makeRandomAddress() }; const { contractAddress } = await client.instantiate( diff --git a/packages/cosmwasm-stargate/src/queries/wasm.spec.ts b/packages/cosmwasm-stargate/src/queries/wasm.spec.ts index f9556c41..78b7897f 100644 --- a/packages/cosmwasm-stargate/src/queries/wasm.spec.ts +++ b/packages/cosmwasm-stargate/src/queries/wasm.spec.ts @@ -62,7 +62,7 @@ async function uploadContract( gas: "89000000", }; const firstAddress = (await signer.getAccounts())[0].address; - const client = await SigningStargateClient.connectWithWallet(wasmd.endpoint, signer, { registry }); + const client = await SigningStargateClient.connectWithSigner(wasmd.endpoint, signer, { registry }); return client.signAndBroadcast(firstAddress, [theMsg], fee, memo); } @@ -94,7 +94,7 @@ async function instantiateContract( }; const firstAddress = (await signer.getAccounts())[0].address; - const client = await SigningStargateClient.connectWithWallet(wasmd.endpoint, signer, { registry }); + const client = await SigningStargateClient.connectWithSigner(wasmd.endpoint, signer, { registry }); return client.signAndBroadcast(firstAddress, [theMsg], fee, memo); } @@ -119,7 +119,7 @@ async function executeContract( }; const firstAddress = (await signer.getAccounts())[0].address; - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, signer, { registry }); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, signer, { registry }); return client.signAndBroadcast(firstAddress, [theMsg], fee, memo); } diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts index 816fff67..def69bad 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.spec.ts @@ -25,11 +25,11 @@ const { MsgDelegate } = codec.cosmos.staking.v1beta1; const { Tx } = codec.cosmos.tx.v1beta1; describe("SigningCosmWasmClient", () => { - describe("connectWithWallet", () => { + describe("connectWithSigner", () => { it("can be constructed", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); expect(client).toBeTruthy(); }); @@ -37,7 +37,7 @@ describe("SigningCosmWasmClient", () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); const gasPrice = GasPrice.fromString("3.14utest"); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet, { gasPrice }); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet, { gasPrice }); const openedClient = (client as unknown) as PrivateSigningCosmWasmClient; expect(openedClient.fees).toEqual({ upload: { @@ -73,7 +73,7 @@ describe("SigningCosmWasmClient", () => { const gasLimits = { send: 160000, }; - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet, { gasLimits }); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet, { gasLimits }); const openedClient = (client as unknown) as PrivateSigningCosmWasmClient; expect(openedClient.fees).toEqual({ upload: { @@ -110,7 +110,7 @@ describe("SigningCosmWasmClient", () => { const gasLimits = { send: 160000, }; - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet, { + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet, { gasPrice, gasLimits, }); @@ -148,7 +148,7 @@ describe("SigningCosmWasmClient", () => { it("works", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const wasm = getHackatom().data; const { codeId, @@ -167,7 +167,7 @@ describe("SigningCosmWasmClient", () => { it("can set builder and source", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const hackatom = getHackatom(); const meta: UploadMeta = { source: "https://crates.io/api/v1/crates/cw-nameservice/0.1.0/download", @@ -184,7 +184,7 @@ describe("SigningCosmWasmClient", () => { it("works with transfer amount", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); const transferAmount = [coin(1234, "ucosm"), coin(321, "ustake")]; const beneficiaryAddress = makeRandomAddress(); @@ -211,7 +211,7 @@ describe("SigningCosmWasmClient", () => { it("works with admin", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); const beneficiaryAddress = makeRandomAddress(); const { contractAddress } = await client.instantiate( @@ -233,7 +233,7 @@ describe("SigningCosmWasmClient", () => { it("can instantiate one code multiple times", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); const contractAddress1 = await client.instantiate( alice.address0, @@ -261,7 +261,7 @@ describe("SigningCosmWasmClient", () => { it("can update an admin", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); const beneficiaryAddress = makeRandomAddress(); const { contractAddress } = await client.instantiate( @@ -296,7 +296,7 @@ describe("SigningCosmWasmClient", () => { it("can clear an admin", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); const beneficiaryAddress = makeRandomAddress(); const { contractAddress } = await client.instantiate( @@ -331,7 +331,7 @@ describe("SigningCosmWasmClient", () => { it("can can migrate from one code ID to another", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId: codeId1 } = await client.upload(alice.address0, getHackatom().data); const { codeId: codeId2 } = await client.upload(alice.address0, getHackatom().data); const beneficiaryAddress = makeRandomAddress(); @@ -371,7 +371,7 @@ describe("SigningCosmWasmClient", () => { it("works", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const { codeId } = await client.upload(alice.address0, getHackatom().data); // instantiate const transferAmount = [coin(233444, "ucosm"), coin(5454, "ustake")]; @@ -414,7 +414,7 @@ describe("SigningCosmWasmClient", () => { it("works", async () => { pendingWithoutWasmd(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, wasmd.prefix); - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet); const transferAmount = coins(7890, "ucosm"); const beneficiaryAddress = makeRandomAddress(); @@ -445,7 +445,7 @@ describe("SigningCosmWasmClient", () => { const registry = new Registry(); registry.register(msgDelegateTypeUrl, MsgDelegate); const options = { registry: registry }; - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet, options); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet, options); const msg = MsgDelegate.create({ delegatorAddress: alice.address0, @@ -476,7 +476,7 @@ describe("SigningCosmWasmClient", () => { const registry = new Registry(); registry.register(msgDelegateTypeUrl, MsgDelegate); const options = { registry: registry }; - const client = await SigningCosmWasmClient.connectWithWallet(wasmd.endpoint, wallet, options); + const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, wallet, options); const msg = MsgDelegate.create({ delegatorAddress: alice.address0, diff --git a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts index 46ec5736..fff66281 100644 --- a/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts +++ b/packages/cosmwasm-stargate/src/signingcosmwasmclient.ts @@ -106,7 +106,7 @@ export class SigningCosmWasmClient extends CosmWasmClient { private readonly registry: Registry; private readonly signer: OfflineDirectSigner; - public static async connectWithWallet( + public static async connectWithSigner( endpoint: string, signer: OfflineDirectSigner, options: SigningCosmWasmClientOptions = {}, diff --git a/packages/cosmwasm-stargate/types/signingcosmwasmclient.d.ts b/packages/cosmwasm-stargate/types/signingcosmwasmclient.d.ts index 8f551b9a..41f160bc 100644 --- a/packages/cosmwasm-stargate/types/signingcosmwasmclient.d.ts +++ b/packages/cosmwasm-stargate/types/signingcosmwasmclient.d.ts @@ -25,7 +25,7 @@ export declare class SigningCosmWasmClient extends CosmWasmClient { private readonly fees; private readonly registry; private readonly signer; - static connectWithWallet( + static connectWithSigner( endpoint: string, signer: OfflineDirectSigner, options?: SigningCosmWasmClientOptions, diff --git a/packages/faucet/src/profile.ts b/packages/faucet/src/profile.ts index 9b394575..cfc44387 100644 --- a/packages/faucet/src/profile.ts +++ b/packages/faucet/src/profile.ts @@ -43,7 +43,7 @@ export async function createClients( > => [ senderAddress, isOfflineDirectSigner(wallet) - ? await SigningStargateClient.connectWithWallet(apiUrl, wallet, { + ? await SigningStargateClient.connectWithSigner(apiUrl, wallet, { gasLimits: constants.gasLimits, gasPrice: constants.gasPrice, }) diff --git a/packages/stargate/src/signingstargateclient.spec.ts b/packages/stargate/src/signingstargateclient.spec.ts index 482f5e54..7a409cbb 100644 --- a/packages/stargate/src/signingstargateclient.spec.ts +++ b/packages/stargate/src/signingstargateclient.spec.ts @@ -26,7 +26,7 @@ describe("SigningStargateClient", () => { it("can be constructed with default fees", async () => { pendingWithoutSimapp(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic); - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet); const openedClient = (client as unknown) as PrivateSigningStargateClient; expect(openedClient.fees).toEqual({ send: { @@ -47,7 +47,7 @@ describe("SigningStargateClient", () => { const registry = new Registry(); registry.register("/custom.MsgCustom", MsgSend); const options = { registry: registry }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const openedClient = (client as unknown) as PrivateSigningStargateClient; expect(openedClient.registry.lookupType("/custom.MsgCustom")).toEqual(MsgSend); }); @@ -57,7 +57,7 @@ describe("SigningStargateClient", () => { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic); const gasPrice = GasPrice.fromString("3.14utest"); const options = { gasPrice: gasPrice }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const openedClient = (client as unknown) as PrivateSigningStargateClient; expect(openedClient.fees).toEqual({ send: { @@ -79,7 +79,7 @@ describe("SigningStargateClient", () => { send: 160000, }; const options = { gasLimits: gasLimits }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const openedClient = (client as unknown) as PrivateSigningStargateClient; expect(openedClient.fees).toEqual({ send: { @@ -102,7 +102,7 @@ describe("SigningStargateClient", () => { send: 160000, }; const options = { gasPrice: gasPrice, gasLimits: gasLimits }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const openedClient = (client as unknown) as PrivateSigningStargateClient; expect(openedClient.fees).toEqual({ send: { @@ -122,7 +122,7 @@ describe("SigningStargateClient", () => { it("works", async () => { pendingWithoutSimapp(); const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic); - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet); const transferAmount = coins(7890, "ucosm"); const beneficiaryAddress = makeRandomAddress(); @@ -153,7 +153,7 @@ describe("SigningStargateClient", () => { const registry = new Registry(); registry.register(msgDelegateTypeUrl, MsgDelegate); const options = { registry: registry }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const msg = MsgDelegate.create({ delegatorAddress: faucet.address0, @@ -180,7 +180,7 @@ describe("SigningStargateClient", () => { const registry = new Registry(); registry.register(msgDelegateTypeUrl, MsgDelegate); const options = { registry: registry }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const msg = MsgDelegate.create({ delegatorAddress: faucet.address0, @@ -233,7 +233,7 @@ describe("SigningStargateClient", () => { pendingWithoutSimapp(); const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic); const options = { registry: registry }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const msg = { delegator_address: faucet.address0, @@ -257,7 +257,7 @@ describe("SigningStargateClient", () => { pendingWithoutSimapp(); const wallet = await ModifyingSecp256k1HdWallet.fromMnemonic(faucet.mnemonic); const options = { registry: registry }; - const client = await SigningStargateClient.connectWithWallet(simapp.tendermintUrl, wallet, options); + const client = await SigningStargateClient.connectWithSigner(simapp.tendermintUrl, wallet, options); const msg = { delegator_address: faucet.address0, diff --git a/packages/stargate/src/signingstargateclient.ts b/packages/stargate/src/signingstargateclient.ts index dd808cff..2cff750e 100644 --- a/packages/stargate/src/signingstargateclient.ts +++ b/packages/stargate/src/signingstargateclient.ts @@ -50,7 +50,7 @@ export class SigningStargateClient extends StargateClient { private readonly signer: OfflineSigner; private readonly aminoTypes = new AminoTypes(); - public static async connectWithWallet( + public static async connectWithSigner( endpoint: string, signer: OfflineSigner, options: SigningStargateClientOptions = {}, diff --git a/packages/stargate/types/signingstargateclient.d.ts b/packages/stargate/types/signingstargateclient.d.ts index cc8eb7bb..b217d13d 100644 --- a/packages/stargate/types/signingstargateclient.d.ts +++ b/packages/stargate/types/signingstargateclient.d.ts @@ -16,7 +16,7 @@ export declare class SigningStargateClient extends StargateClient { private readonly registry; private readonly signer; private readonly aminoTypes; - static connectWithWallet( + static connectWithSigner( endpoint: string, signer: OfflineSigner, options?: SigningStargateClientOptions, diff --git a/scripts/wasmd/deploy_cw1.js b/scripts/wasmd/deploy_cw1.js index 2b1ab2c1..e32b0351 100755 --- a/scripts/wasmd/deploy_cw1.js +++ b/scripts/wasmd/deploy_cw1.js @@ -22,7 +22,7 @@ const codeMeta = { async function main() { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm"); - const client = await SigningCosmWasmClient.connectWithWallet(endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/cw1_subkeys.wasm"); const uploadReceipt = await client.upload(alice.address0, wasm, codeMeta, "Upload CW1 subkeys contract"); diff --git a/scripts/wasmd/deploy_cw3.js b/scripts/wasmd/deploy_cw3.js index d8d99e5a..74369db1 100755 --- a/scripts/wasmd/deploy_cw3.js +++ b/scripts/wasmd/deploy_cw3.js @@ -64,7 +64,7 @@ const initData = [ async function main() { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm"); - const client = await SigningCosmWasmClient.connectWithWallet(endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/cw3_fixed_multisig.wasm"); const uploadReceipt = await client.upload( diff --git a/scripts/wasmd/deploy_erc20.js b/scripts/wasmd/deploy_erc20.js index 44589fd9..52059e39 100755 --- a/scripts/wasmd/deploy_erc20.js +++ b/scripts/wasmd/deploy_erc20.js @@ -135,7 +135,7 @@ const initDataJade = { async function main() { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm"); - const client = await SigningCosmWasmClient.connectWithWallet(endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/cw_erc20.wasm"); const uploadReceipt = await client.upload(alice.address0, wasm, codeMeta, "Upload ERC20 contract"); diff --git a/scripts/wasmd/deploy_hackatom.js b/scripts/wasmd/deploy_hackatom.js index b2efa8a1..8197d501 100755 --- a/scripts/wasmd/deploy_hackatom.js +++ b/scripts/wasmd/deploy_hackatom.js @@ -49,7 +49,7 @@ const inits = [ async function main() { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(alice.mnemonic, undefined, "wasm"); - const client = await SigningCosmWasmClient.connectWithWallet(endpoint, wallet); + const client = await SigningCosmWasmClient.connectWithSigner(endpoint, wallet); const wasm = fs.readFileSync(__dirname + "/contracts/hackatom.wasm"); const uploadReceipt = await client.upload(alice.address0, wasm, codeMeta, "Upload hackatom contract"); diff --git a/scripts/wasmd/send_first.js b/scripts/wasmd/send_first.js index a390491f..fa20673b 100755 --- a/scripts/wasmd/send_first.js +++ b/scripts/wasmd/send_first.js @@ -17,7 +17,7 @@ const faucet = { async function main() { const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic, undefined, prefix); - const client = await SigningStargateClient.connectWithWallet(rpcUrl, wallet); + const client = await SigningStargateClient.connectWithSigner(rpcUrl, wallet); const recipient = Bech32.encode(prefix, Random.getBytes(20)); const amount = coins(226644, "ucosm"); const memo = "Ensure chain has my pubkey";