Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify tokenlists.org JSON schema to be usable for address books #244

Open
3 tasks
aspiers opened this issue Apr 12, 2024 · 1 comment
Open
3 tasks

modify tokenlists.org JSON schema to be usable for address books #244

aspiers opened this issue Apr 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request interoperability
Milestone

Comments

@aspiers
Copy link
Member

aspiers commented Apr 12, 2024

Motivation

Web3 address books should not be isolated to a single dApp or wallet or portfolio manager or developer tool. We should aim for a world where every EOA and smart contract should be labelled in a user-friendly way in every web3 UI, without users having to manually label them separately in each tool. This means that web3 UX should provide seamless synchronisation of address books across the whole ecosystem, whilst preserving user privacy and keeping sharing of addresses between tools a strictly opt-in but user-friendly process.

Indeed that was one of the main goals of rolod0x: to make an address book which works across any app and any chain. But a browser extension is also a form of moat, because it only works for web pages on desktop browsers, and not elsewhere like mobile apps, wallets, other desktop apps etc.

I have plenty of plans to build draw-bridges across the moat - see all these interoperability issues. However, all drawbridges will benefit from some kind of common interchange format which every tool can support. If web3 is able to standardise on this, then we stand a much better chance of general interoperability where every address book can work with any tool.

So this issue describes a proposal for how to achieve a common interchange format for web3 address books.

Potential consumers of this standard

Initially these tools could simply add support for import from / export to the standard format, but later automatic synchronisation functionality could be implemented so that address book data could seamlessly synchronise between tools according to policies approved by the user.

Design

The tokenlists.org JSON schema is really interesting, but it was (obviously) designed specifically for creating lists of tokens and nothing else. Hence it's not quite fit for purpose as a general address book schema, which also needs to support both EOAs and smart contracts which are not tokens.

So we should produce a modified version which is fit for purpose. Some of the modifications needed:

  • Don't require chainId, since EOAs are inherently cross-chain, and contracts can be deployed with the same address on multiple chains. Alternatively chainId of 0 could mean any chain, but currently their schema enforces a minimum of 1.
  • Don't require the TokenInfo section.
  • FIXME: more needed here
@aspiers
Copy link
Member Author

aspiers commented Apr 30, 2024

See https://gist.github.com/Beasta/26f630e524209c871812a5d88158af68 for a similar initiative. Thanks @Beasta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request interoperability
Projects
None yet
Development

No branches or pull requests

1 participant