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

CosmosOrchestrationAccount's amountToCoin returns incorrect denom when presented a Brand #10449

Open
0xpatrickdev opened this issue Nov 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@0xpatrickdev
Copy link
Member

Describe the bug

CosmosOrchestrationAccount's amountToCoin / coerceCoin / coerceDenom helpers do not account for issuing/host chain logic.

Example:

// actual
helper.amountToCoin(ISTbrand) => ({ denom: 'uist', amount: 1n })

// expected
helper.amountToCoin(ISTbrand, holdingChain) => ({ denom: 'ibc/uisthash', amount: 1n })

Most tests use DenomArg instead of AmountArg, as we are waiting on #9752, #9966, #9967, so this path wasn't well trodden.

To Reproduce

/packages/orchestration/test/exos/cosmos-orchestration-account.test.ts has a test that mentions this

Expected behavior

The helper should return the denom from the perspective of the holding chain. IOW, the host chain for the ICA.

@0xpatrickdev 0xpatrickdev added the bug Something isn't working label Nov 11, 2024
@0xpatrickdev 0xpatrickdev changed the title CosmosOrchestrationAccount's amountToCoin does not account for CosmosOrchestrationAccount's amountToCoin returns incorrect denom when presented a Brand Nov 11, 2024
0xpatrickdev added a commit to 0xpatrickdev/agoric-sdk that referenced this issue Nov 12, 2024
this test can no longer rely on the IST brand being available, so we
 - added checks to ensure brands are accepted for `.transfer` and `.send`
 - filed Agoric#10449 since this surfaced a bug in `amountToCoin`
 - use Moolah issuer for "no denom for brand" failure path tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant