Upstream useful helpers into @cosmjs/cli
See original GitHub issueIn 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:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Starting with 0.23.1, you can use a
FaucetClient
in the CLI (see https://github.com/CosmWasm/cosmjs/pull/470)0.23.1 was just released, including the
FaucetClient