Skip to content

Commit

Permalink
add native functions for getWithdrawalAndTransferGatingStatus and get…
Browse files Browse the repository at this point in the history
…WithdrawalCapacityByDenom
  • Loading branch information
mike-dydx committed Apr 2, 2024
1 parent 8139235 commit 8350213
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions v4-client-js/src/clients/native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,23 @@ export async function cctpWithdraw(squidPayload: string): Promise<String> {
return wrappedError(error);
}
}

export async function getWithdrawalCapacityByDenom(denom: string): Promise<string> {
try {
const validatorClient = globalThis.client.validatorClient;
const result = await validatorClient.get.getWithdrawalCapacityByDenom(denom);
return encodeJson(result);
} catch (e) {
return wrappedError(e);
}
}

export async function getWithdrawalAndTransferGatingStatus(): Promise<string> {
try {
const validatorClient = globalThis.client.validatorClient;
const result = await validatorClient.get.GetWithdrawalAndTransferGatingStatus();
return encodeJson(result);
} catch (e) {
return wrappedError(e);
}
}

0 comments on commit 8350213

Please sign in to comment.