Skip to content

Commit

Permalink
SDK Gov Bug (#20309)
Browse files Browse the repository at this point in the history
## Description 

SDK governance bug fix

## Test plan 

Locally and testnet

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
leecchh authored Nov 18, 2024
1 parent d56e282 commit 2a532bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-avocados-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@mysten/deepbook-v3': patch
---

Governance function update
3 changes: 3 additions & 0 deletions sdk/deepbook-v3/src/transactions/governance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export class GovernanceContract {
const pool = this.#config.getPool(poolKey);
const balanceManager = this.#config.getBalanceManager(balanceManagerKey);
const tradeProof = tx.add(this.#config.balanceManager.generateProof(balanceManagerKey));
const baseCoin = this.#config.getCoin(pool.baseCoin);
const quoteCoin = this.#config.getCoin(pool.quoteCoin);

tx.moveCall({
target: `${this.#config.DEEPBOOK_PACKAGE_ID}::pool::vote`,
Expand All @@ -115,6 +117,7 @@ export class GovernanceContract {
tradeProof,
tx.pure.id(proposal_id),
],
typeArguments: [baseCoin.type, quoteCoin.type],
});
};
}

0 comments on commit 2a532bc

Please sign in to comment.