Iโm trying to use moralis API to get the token balance for a specific bsc token in a specific wallet and it is working but it seems like there is at least a 30 second+ time delay between the completed transaction and when Moralis reports the updated balance. Is this delay normal? What is the normal time delay? and is there any way to make it faster?
It gets updated as soon as the transaction is processed.
On which chain are you testing?
If you are only looking for a balance of one particular token, you can read the balacne using the smart contract call.
there is a delay until the transaction is considered as confirmed
Thatโs brilliant , I was thinking something like that would be ideal. Whatโs that called with moralis?
I was noticing a delay beyond when the transaction was confirmed on bscscan
BInance smart chain , only one token balance
You can do it using runcontractfunction
You need to use abi of balanceOf
function from contract and pass the required parameters.
Would I be able to get the success code of a transaction with getContractEvents ? If so would i use the Transaction hash for the address and what should i put for the topic of the event? My goal is to verify that a transaction has successfully bought or sold a token, so i was initially trying to verfiy this by seeing if any of that token was in the given wallet, but seeing the success code of the transaction seems like it could also work.