Brian Bergeron wrote:
I do suspect getTokenStandardAndDetails is used in some places it shouldn't. It should only be used when we have an address and no idea what kind of token it is. Because it has to cycle through all the standards. For example this code just wants ERC20 decimals:
Which should be 1 RPC request since we already 'know' its an ERC20, but that could do up to 4 RPC requests (checking for NFTs and returning other ERC20 details other than decimals)
Brian Bergeron wrote: I do suspect getTokenStandardAndDetails is used in some places it shouldn't. It should only be used when we have an address and no idea what kind of token it is. Because it has to cycle through all the standards. For example this code just wants ERC20 decimals:
Which should be 1 RPC request since we already 'know' its an ERC20, but that could do up to 4 RPC requests (checking for NFTs and returning other ERC20 details other than decimals)