Currently, grabber automatically detect KRC20 by trying to call some functions (name(), symbol(), totalSupply(), decimal()) of the destination contract to determine if this contract is a KRC20 token (code at https://github.com/kardiachain/kardia-explorer-backend/blob/master/kardia/krc20.go#L151). We need a proper way to determine if a contract is a KRC20 or KRC721 ones based on its interface, and should we automatically detect, store and show KRC tokens to our explorer at https://explorer.kardiachain.io/tokens?
Currently, grabber automatically detect KRC20 by trying to call some functions (
name()
,symbol()
,totalSupply()
,decimal()
) of the destination contract to determine if this contract is a KRC20 token (code at https://github.com/kardiachain/kardia-explorer-backend/blob/master/kardia/krc20.go#L151). We need a proper way to determine if a contract is a KRC20 or KRC721 ones based on its interface, and should we automatically detect, store and show KRC tokens to our explorer at https://explorer.kardiachain.io/tokens?