Skip to content

Commit

Permalink
Speedup cosmwasm testing
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Aug 2, 2021
1 parent ef7b7ad commit 96177be
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 53 deletions.
16 changes: 13 additions & 3 deletions packages/cosmwasm-stargate/src/queries/wasm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
alice,
bech32AddressMatcher,
ContractUploadInstructions,
defaultSigningClientOptions,
getHackatom,
makeRandomAddress,
makeWasmClient,
Expand Down Expand Up @@ -58,7 +59,10 @@ async function uploadContract(
gas: "89000000",
};
const firstAddress = (await signer.getAccounts())[0].address;
const client = await SigningStargateClient.connectWithSigner(wasmd.endpoint, signer, { registry });
const client = await SigningStargateClient.connectWithSigner(wasmd.endpoint, signer, {
...defaultSigningClientOptions,
registry,
});
return client.signAndBroadcast(firstAddress, [theMsg], fee, memo);
}

Expand Down Expand Up @@ -90,7 +94,10 @@ async function instantiateContract(
};

const firstAddress = (await signer.getAccounts())[0].address;
const client = await SigningStargateClient.connectWithSigner(wasmd.endpoint, signer, { registry });
const client = await SigningStargateClient.connectWithSigner(wasmd.endpoint, signer, {
...defaultSigningClientOptions,
registry,
});
return client.signAndBroadcast(firstAddress, [theMsg], fee, memo);
}

Expand All @@ -115,7 +122,10 @@ async function executeContract(
};

const firstAddress = (await signer.getAccounts())[0].address;
const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, signer, { registry });
const client = await SigningCosmWasmClient.connectWithSigner(wasmd.endpoint, signer, {
...defaultSigningClientOptions,
registry,
});
return client.signAndBroadcast(firstAddress, [theMsg], fee, memo);
}

Expand Down
Loading

0 comments on commit 96177be

Please sign in to comment.