question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upstream useful helpers into @cosmjs/cli

See original GitHub issue

In https://github.com/CosmWasm/cosmwasm-plus/pull/46 I went to make the easiest intro to using the cw20-base contract via @cosmjs/cli. However, the setup code we have by default wasn’t the simplest, so I refactored this along the way.

In particular, please look at this code section: https://github.com/CosmWasm/cosmwasm-plus/blob/master/contracts/cw20-base/helpers.ts#L19-L134

It allows us to simply const client = await useOptions(coralnetOptions).setup(password); and create or recover a password-encrypted key, configured with all chain-specific options. We can provide different options, like gaiaFlexOptions for easy drop-in. I also worked to limit the number of top-level exports to avoid name-space pollution.

However, I would rather not copy this code in each contract we support with helpers and wanted to upstream it to @cosmjs/cli. I was thinking to keep the actual concrete options in the contract helpers for now, until we figure out how to do mix ins (options from testnets dir, cw20-base bindings here, cw1-subkeys bindings here…).

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
webmaster128commented, Oct 14, 2020

Starting with 0.23.1, you can use a FaucetClient in the CLI (see https://github.com/CosmWasm/cosmjs/pull/470)

0reactions
webmaster128commented, Oct 27, 2020

0.23.1 was just released, including the FaucetClient

Read more comments on GitHub >

github_iconTop Results From Across the Web

@cosmjs/cli - npm
Start using @cosmjs/cli in your project by running `npm i @cosmjs/cli`. There are 2 other projects in the npm registry using @cosmjs/cli.
Read more >
cheqd's “open-source-a-thon” to contribute new tools to ...
Helpful tooling, infrastructure and analytics packages for Cosmos SDK, which can be easily adopted by other Cosmos/IBC chain developers. Core Identity ...
Read more >
@cosmjs/cli NPM | npm.io
editor in the repl to allow multi-line commands. Alternative is to place entire regenOptions on one line. Run ./bin/cosmwasm-cli --init examples/helpers.ts
Read more >
Requesting a package version with upstream repositories
If a CodeArtifact repository has an upstream relationship with a repository that has an external connection, requests for packages not in the upstream...
Read more >
Generic guidance for FOCUS surface water Scenarios
The guidance document on Surface Water Models included three important recommenda- ... and it is hoped that these will help to reduce differences...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found