Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change pebblenet to uni and update wasm binary to 0.10.2 #560

Merged
merged 2 commits into from Nov 30, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions contracts/cw20-base/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import { calculateFee } from "@cosmjs/stargate"
* Usage: npx @cosmjs/cli@^0.26 --init https://raw.githubusercontent.com/CosmWasm/cw-plus/master/contracts/base-helpers.ts --init https://raw.githubusercontent.com/CosmWasm/cw-plus/master/contracts/cw20-base/helpers.ts
*
* Create a client:
* const [addr, client] = await useOptions(pebblenetOptions).setup('password');
* const [addr, client] = await useOptions(uniOptions).setup('password');
*
* Get the mnemonic:
* await useOptions(pebblenetOptions).recoverMnemonic(password);
* await useOptions(uniOptions).recoverMnemonic(password);
*
* Create contract:
* const contract = CW20(client, pebblenetOptions);
* const contract = CW20(client, uniOptions);
*
* Upload contract:
* const codeId = await contract.upload(addr, pebblenetOptions);
* const codeId = await contract.upload(addr, uniOptions);
*
* Instantiate contract example:
* const initMsg = {
Expand All @@ -28,7 +28,7 @@ import { calculateFee } from "@cosmjs/stargate"
* initial_balances: [{ address: addr, amount: "10000" }],
* mint: { "minter": addr }
* };
* const instance = await contract.instantiate(addr, codeId, initMsg, 'Potato Coin!', pebblenetOptions);
* const instance = await contract.instantiate(addr, codeId, initMsg, 'Potato Coin!', uniOptions);
*
* If you want to use this code inside an app, you will need several imports from https://github.com/CosmWasm/cosmjs
*/
Expand Down Expand Up @@ -269,7 +269,7 @@ export const CW20 = (client: SigningCosmWasmClient, options: Options): CW20Contr
}

const upload = async (senderAddress: string, options: Options): Promise<number> => {
const sourceUrl = "https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.8.1/cw20_base.wasm"
const sourceUrl = "https://github.com/CosmWasm/cosmwasm-plus/releases/download/v0.10.2/cw20_base.wasm"
const wasm = await downloadWasm(sourceUrl)
const fee = calculateFee(options.fees.upload, options.gasPrice)
const result = await client.upload(senderAddress, wasm, fee)
Expand Down