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

standaone cennznet utils #419

Open
jordy25519 opened this issue Feb 14, 2022 · 0 comments
Open

standaone cennznet utils #419

jordy25519 opened this issue Feb 14, 2022 · 0 comments

Comments

@jordy25519
Copy link
Contributor

jordy25519 commented Feb 14, 2022

need a small package for cennznet/evm development.
it should be split from here so it doesn't have the complexity of the @polkadot packages (i.e. usable with current ethereum dapps without any changes)

functions needed:

  • evm to cennznet address conversion
  • generic asset id to address
  • nft id to address

derive NFT address

AAAAAAAA + bytes(collectionId) + bytes(seriesId) + padRight(0, 4)

derive GA address

CCCCCCCC + bytes(assetId) + padRight(0, 12)
e.g. 16000 = 0xCCCCCCCC00003e80000000000000000000000000

cc #411

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

No branches or pull requests

1 participant