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

name-service: Migrate to cosmwasm v0.11.0 #97

Merged
merged 29 commits into from
Nov 11, 2020

Conversation

orkunkl
Copy link
Contributor

@orkunkl orkunkl commented Oct 5, 2020

Related to #94
Don't merge until cosmwasm/v0.11.0 is released

@orkunkl orkunkl mentioned this pull request Oct 5, 2020
7 tasks
nameservice/src/contract.rs Show resolved Hide resolved
nameservice/src/contract.rs Show resolved Hide resolved
nameservice/src/tests.rs Show resolved Hide resolved
@orkunkl orkunkl requested a review from maurolacy October 5, 2020 16:03
@orkunkl orkunkl changed the title name-service: Migrate to cosmwasm v0.11.0-alpha3 name-service: Migrate to cosmwasm v0.11.0-alpha4 Oct 6, 2020
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

nameservice/src/error.rs Outdated Show resolved Hide resolved
@orkunkl orkunkl changed the title name-service: Migrate to cosmwasm v0.11.0-alpha4 name-service: Migrate to cosmwasm v0.11.0 Oct 12, 2020
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

nameservice/src/error.rs Outdated Show resolved Hide resolved
nameservice/src/contract.rs Show resolved Hide resolved
nameservice/helpers.ts Outdated Show resolved Hide resolved
nameservice/helpers.ts Outdated Show resolved Hide resolved
nameservice/helpers.ts Outdated Show resolved Hide resolved
nameservice/helpers.ts Outdated Show resolved Hide resolved
nameservice/helpers.ts Outdated Show resolved Hide resolved
nameservice/helpers.ts Outdated Show resolved Hide resolved
nameservice/helpers.ts Outdated Show resolved Hide resolved
}

const coralnetOptions: Options = {
httpUrl: 'https://lcd.coralnet.cosmwasm.com',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
httpUrl: 'https://lcd.coralnet.cosmwasm.com',
httpUrl: 'https://rest.cosmwasm.hub.hackatom.dev',


const coralnetOptions: Options = {
httpUrl: 'https://lcd.coralnet.cosmwasm.com',
networkId: 'cosmwasm-coral',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
networkId: 'cosmwasm-coral',
networkId: 'hackatom-wasm',

source: "https://github.com/CosmWasm/cosmwasm-examples/tree/nameservice-0.7.0/nameservice",
builder: "cosmwasm/rust-optimizer:0.10.4"
};
const sourceUrl = "https://github.com/CosmWasm/cosmwasm-examples/releases/download/nameservice-0.7.0/contract.wasm";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const sourceUrl = "https://github.com/CosmWasm/cosmwasm-examples/releases/download/nameservice-0.7.0/contract.wasm";
const sourceUrl = "https://raw.githubusercontent.com/CosmWasm/cosmwasm-examples/master/mask/artifacts/cw_nameservice.wasm";

* Usage: npx @cosmjs/cli --init https://raw.githubusercontent.com/CosmWasm/cosmwasm-examples/master/nameservice/helpers.ts
*
* Create a client:
* const client = await useOptions(coralnetOptions).setup(password);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* const client = await useOptions(coralnetOptions).setup(password);
* const client = await useOptions(heldernetOptions).setup(password);

* await client.getAccount()
*
* Get the mnemonic:
* await useOptions(coralnetOptions).recoverMnemonic(password)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* await useOptions(coralnetOptions).recoverMnemonic(password)
* await useOptions(heldernetOptions).recoverMnemonic(password)

readonly gasLimits: Partial<GasLimits<CosmWasmFeeTable>> // only set the ones you want to override
}

const coralnetOptions: Options = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const coralnetOptions: Options = {
const heldernetOptions: Options = {

Comment on lines +83 to +84
coralnetOptions.gasPrice,
coralnetOptions.gasLimits,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
coralnetOptions.gasPrice,
coralnetOptions.gasLimits,
heldernetOptions.gasPrice,
heldernetOptions.gasLimits,

Comment on lines +99 to +100
const wallet = await loadOrCreateWallet(coralnetOptions, keyfile, password);
const client = await connect(wallet, coralnetOptions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const wallet = await loadOrCreateWallet(coralnetOptions, keyfile, password);
const client = await connect(wallet, coralnetOptions);
const wallet = await loadOrCreateWallet(heldernetOptions, keyfile, password);
const client = await connect(wallet, heldernetOptions);


const recoverMnemonic = async (password: string, filename?: string): Promise<string> => {
const keyfile = filename || options.defaultKeyFile;
const wallet = await loadOrCreateWallet(coralnetOptions, keyfile, password);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const wallet = await loadOrCreateWallet(coralnetOptions, keyfile, password);
const wallet = await loadOrCreateWallet(heldernetOptions, keyfile, password);

@maurolacy maurolacy mentioned this pull request Nov 8, 2020
@maurolacy
Copy link
Contributor

Should I go ahead and apply the remaining changes, so we can merge this?

As a way to validate it, it could be a good opportunity for me to learn how to deploy it to testnet, and verify it's working.

@webmaster128
Copy link
Contributor

@maurolacy please take over this. Orkun is on vacation next week.

Can you verifiy the JS scripts work? Here are all the network info for Heldernet: https://gist.github.com/webmaster128/6385a7e1885211d9937ada2688ce34c3

maurolacy and others added 9 commits November 9, 2020 11:54
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
@webmaster128
Copy link
Contributor

This includes the upgrade 0.10 -> 0.11 -> 0.12 now in one PR

@webmaster128 webmaster128 merged commit 26eb619 into master Nov 11, 2020
@webmaster128 webmaster128 deleted the cw-0.11.0-name-service branch November 11, 2020 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants