Content
@
0 reply
0 recast
0 reaction
Brian Li ๐๐พ
@bli.eth
Building /frens, a crypto messaging app. Spent the week on a caching system for tokens (like erc20s) based around CAIP-19 cross-chain ids. Motivation was to have a standardized unique identifier that had all the data necessary so we wouldnโt have to refactor from the ground up for Solana or Bitcoin.
5 replies
3 recasts
16 reactions
Brian Li ๐๐พ
@bli.eth
CAIP-19 defines a way to identify assets like erc20 tokens in a human readable way: "{{chain_id}}{{asset_namespace}}{{asset_reference}}" For example, USDC on Base would be defined as: "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" Shoutout to @pedrouid.eth and others for their amazing work: https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-19.md
1 reply
0 recast
2 reactions
Brian Li ๐๐พ
@bli.eth
APIs should do more to simplify this for developers. Below shows the id for $DEGEN on Base across APIs: Zerion: "0x4ed4e862860bed51a9570b96d89af5e1b0efefed-base-asset-asset" CoinGecko: "base_0x4ed4e862860bed51a9570b96d89af5e1b0efefed" SimpleHash: "base.0x4ed4e862860bed51a9570b96d89af5e1b0efefed"
1 reply
0 recast
1 reaction
Brian Li ๐๐พ
@bli.eth
This works for chain names that are fairly standardized like "base", but can get very frustrating when new L3s emerge and one platform chooses to represent it as "degen" and another chooses to use "degenchain".
0 reply
0 recast
1 reaction