Skip to content

Commit

Permalink
feat(rpc): Add FT balance (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
tifrel authored Dec 5, 2023
1 parent aa108a7 commit 013903e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/rpc/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ export * from './methods/getBlockHash';
export * from './methods/getGasPrice';
export * from './methods/getLatestGasPrice';
export * from './methods/keys';
export { callViewMethod } from './util';
9 changes: 9 additions & 0 deletions packages/rpc/src/methods/ftBalance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { callViewMethod } from '../util';

export const ftBalance = async ({ contractId, accountId }): Promise<string> => {
return callViewMethod<string>({
contractId,
method: 'ft_balance_of',
args: { account_id: accountId },
});
};

0 comments on commit 013903e

Please sign in to comment.