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

sibling token rework #1785

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

zqhxuyuan
Copy link
Contributor

@zqhxuyuan zqhxuyuan commented Jan 16, 2022

relates to: #1773

the asset-registry module could used for not only statemine/statemint assets, but also sibling token(i.e BNC, PHA etc). thus for new sibling token onboard to acala, now we can use register_foreign_asset dispatch call of asset-registry instead of merge PR to acala code base from parachain team.

a side-effect is asset-registry use foreign-asset-id which is number instead of TokenSymbol enum, thus in front/dapp we may need TokenSymbol mapping to foreign-asset-id, make sure the token mapping is correct.

todo list:

  • Trader bunch of FixedRateOfFungible
  • migrations

@codecov
Copy link

codecov bot commented Jan 16, 2022

Codecov Report

Merging #1785 (dd3c441) into master (8bd22c5) will decrease coverage by 0.64%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1785      +/-   ##
==========================================
- Coverage   85.81%   85.17%   -0.65%     
==========================================
  Files          78       74       -4     
  Lines       17388    15922    -1466     
==========================================
- Hits        14921    13561    -1360     
+ Misses       2467     2361     -106     
Impacted Files Coverage Δ
modules/asset-registry/src/lib.rs 59.78% <100.00%> (ø)
modules/currencies/src/lib.rs
modules/nft/src/lib.rs
modules/nft/src/tests.rs
modules/currencies/src/tests.rs

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bd22c5...dd3c441. Read the comment docs.

PHA("Phala Native Token", 12) = 170,
KINT("Kintsugi Native Token", 12) = 171,
KBTC("Kintsugi Wrapped BTC", 8) = 172,
// BNC("Bifrost Native Token", 12) = 168,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break compatibility for both SDK and existing runtime storages (e.g. BNC swap pair)
It should be possible to do some migration but it isn't that much beneficial to migrate.

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

Successfully merging this pull request may close these issues.

None yet

2 participants