-
Discord user ID0xdaorren Describe your question in detail.https://explorer.aptoslabs.com/txn/1218664456/payload?network=testnet but when I use get_account_resources API, there's no fungible store resource displayed What error, if any, are you getting?No response What have you tried or looked at? Or how can we reproduce the error?https://preview.aptos.dev/en/build/smart-contracts/aptos-standards/fungible-asset#balance
how to get this so-called "FungibleStore and ConcurrentFungibleBalance" Which operating system are you using?macOS Which SDK or tool are you using? (if any)TypeScript SDK Describe your environment or tooling in detailNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
import { Account, Aptos, AptosConfig, Network } from "@aptos-labs/ts-sdk";
const config = new AptosConfig({ network: Network.TESTNET }); // default network is devnet
const aptos = new Aptos(config);
const accountAddress = "0x5960725b0be64bfd1931f9f1f2db9ff0833404a152bec1dda9fe18556bda3ef8";
const FAAddress = "0x7928ee33b2e3ee8561f0869ee3f3b93645f3e17ee946718fcd85e852f3f991a7";
const faBalance = await aptos.getCurrentFungibleAssetBalances({
options: {
where: {
owner_address: {_eq: accountAddress},
asset_type: {_eq: FAAddress}
}
}
}); I got this from example folder of aptos ts sdk, I think this is what I need |
Beta Was this translation helpful? Give feedback.
I got this from example folder of aptos ts sdk, I think this is what I need