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

Chain registry in decoding lib #515

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Ptroger
Copy link
Contributor

@Ptroger Ptroger commented Aug 20, 2024

This PR adds a new config input to the decoding lib. It's an object made of chains and slip44.
This object will be the list of supported chains by the decoding lib. If a chain is not in this list, no native transfers will be able to be performed on this chain.
The secondary idea is to make the decoding lib defaulting to usage of data signed by the user in its entities. Meaning JSON inputs that are then used to build different registries.

For the Chain entities: It's a JSON object where keys are chainIds and value, for the moment, is an object:
{
nativeSlip44: number
}

e.g:

{
  1: {
    nativeSlip44: 60
  },
  60: {
    nativeSlip44: 966
  }
}

This object can be extensed later with other metadata we need.

Another part of this PR is a script that builds the default JSON input of supported chains.
It is made from viem supported chains and slip44 values.

Copy link

vercel bot commented Aug 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
devtool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 11:21am
manager ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 11:21am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant