UNPKG

sei-agent-kit

Version:

A package for building AI agents on the SEI blockchain

15 lines 541 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBalance = getBalance; const viem_1 = require("viem"); const erc20Abi = (0, viem_1.parseAbi)(['function balanceOf(address) view returns (uint256)']); async function getBalance(agent, tokenAddress) { const balance = await agent.publicClient.readContract({ address: tokenAddress, abi: erc20Abi, functionName: 'balanceOf', args: [agent.wallet_address], }); return balance; } //# sourceMappingURL=getBalance.js.map