-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
- In CosmJS I can do:
const gas = await client.simulate(address, [msg], memo);
In interchainjs I must hand-craft TxBody and SignerInfo[] for:
await signer.simulateByTxBody(txBody, signerInfos);
This is significantly more involved, and after many attempts I haven’t been able to make simulation succeed. It seems broken
- In interchainjs, the ABCI query helper returns only result.value, silently dropping errors when result.code != 0:
// interchainjs
async request(service, method, data) {
const path = `/${service}/${method}`;
const result = await this.queryAbci({ path, data });
return result.value; // <-- when result.code != 0, error log is lost
}
This swallows log, making it impossible to diagnose why simulation failed.
Please expose a simple simulate(address, messages, opts) API (or similar).
In the request path, when code != 0, propagate the ABCI error.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels