Function `getAccount` in SigningCosmWasmClient doesn't work properly
See original GitHub issueFunction getAccount
in SigningCosmWasmClient doesn’t work properly. Seems like js expects Account
instead of BaseAccount
Response from the node with cosmos-sdk v0.41.0
{ height: '1497', result: { type: 'cosmos-sdk/BaseAccount', value: { address: 'darc1rzdt9wrzwv3x7vv6f7xpyaqqgf3lt6phptqtsx', public_key: [Object], sequence: '2' } } }
And code expects cosmos-sdk/Account
if (responseData.result.type !== "cosmos-sdk/Account") { throw new Error("Unexpected response data format"); }
Node versions: github.com/cosmos/cosmos-sdk v0.41.0 github.com/CosmWasm/wasmvm v0.13.0
JS package 0.24.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Contract Semantics | CosmWasm Documentation
In the Cosmos SDK, a transaction returns a number of events to the user, along with an optional data "result". This result is...
Read more >CosmWasmClient Part 2: Writing - Medium
In the first part of this duology, we saw how to use the class CosmWasmClient from CosmWasm JS for reading data from a...
Read more >CosmWasm for Developers - Cosmos Blog
CosmWasm is a new smart contracting platform built for the cosmos ecosystem. ... (it definitely takes more work to get your first sample...
Read more >CosmWasm/CosmJS: from zero to hero - YouTube
Description:Presenters: Orkun Külçe, Dev relations engineerAbel Fernández Nandín, Frontend engineer CosmWasm is a new smart contracting ...
Read more >Unable to verify leaf signature - Stack Overflow
Note: the following is dangerous, and will allow API content to be intercepted and modified between the client and the server. This also...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is a duplicate of https://github.com/cosmos/cosmjs/issues/537.
The problem here is that the Cosmo SDK broke their promise to provide a compatible LCD API by changing the type identifier of the account from Launchpad to Stargate. I suspect cosmos-sdk/Account is an interface and cosmos-sdk/BaseAccount is an implementation of that interface.
You are using @cosmjs/launchpad, right? I think the way forward would be to migrate to the @cosmjs/stargate package, that provides similar functionality. @cosmjs/stargate does not use the LCD API anymore. Instead it connects to Tendermint RPC. See https://gist.github.com/webmaster128/8444d42a7eceeda2544c8a59fbd7e1d9 for some starting points.
Nope.
@cosmjs/launchpad
never supported connecting to a Cosmos SDK 0.40+ backend. If it worked for some things, it was luck. But it is known to be incompatible because Cosmos SDK changed the account structure in 0.40 (Stargate).