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 Mar 18, 2024
1 parent a4bb4de commit eef05d3
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 @@ -1182,3 +1182,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 eef05d3

Please sign in to comment.