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

Orchestration Account - Query Balances #9610

Closed
Tracked by #12
0xpatrickdev opened this issue Jun 28, 2024 · 0 comments · Fixed by #10029
Closed
Tracked by #12

Orchestration Account - Query Balances #9610

0xpatrickdev opened this issue Jun 28, 2024 · 0 comments · Fixed by #10029
Assignees
Labels
enhancement New feature or request

Comments

@0xpatrickdev
Copy link
Member

0xpatrickdev commented Jun 28, 2024

What is the Problem Being Solved?

This ticket captures three related items:

  1. CosmosOrchestrationAccount and LocalOrchestrationAccount do not have the getBalances interface implemented (only getBalance).

  2. LocalOrchestrationAccount uses the getBalance method from vats/localchain.js, which calls out to vbank. This presents a challenge if the caller is trying to work with an asset that's not recognized by vbank:

    async getBalance(brand) {
    const { bank } = this.state;
    const purse = E(bank).getPurse(brand);
    return E(purse).getCurrentAmount();
    },

    Also, it doesn't seem Bank (vbank) has an interface for enumerating purses. The implementation may require iterating over every known asset, which is not ideal.

Description of the Design

Security Considerations

Scaling Considerations

Test Plan

Upgrade Considerations

@0xpatrickdev 0xpatrickdev added the enhancement New feature or request label Jun 28, 2024
mergify bot added a commit that referenced this issue Sep 4, 2024
refs: #9610

## Description
- adds `.getBalances()` method to `cosmos-orchestration-accounts.js`
- adds e2e tests of `CosmosOrchAccount` `getBalance()` and `getBalances()` in `multichain-testing`
- moves `*query` invitations used for testing out of `src/examples/basic-flows` contract into its own contract stored in `src/fixtures/query-flows.contract.js`

### Security Considerations
n/a, using existing powers

### Scaling Considerations
n/a

### Documentation Considerations
n/a 

### Testing Considerations
Includes unit tests with high fidelity mocks and e2e tests.

### Upgrade Considerations
n/a, unreleased code
@mergify mergify bot closed this as completed in #10029 Sep 6, 2024
@mergify mergify bot closed this as completed in b31bd09 Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant