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

Track registered native tokens #994

Closed
wants to merge 1 commit into from
Closed

Conversation

vgeddes
Copy link
Collaborator

@vgeddes vgeddes commented Nov 6, 2023

This is useful for implementing the "Polkadot-native assets on Ethereum" story post-launch. It allows the gateway to know whether a particular ERC20 token has been registered or not.

Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (c9196e1) 83.25% compared to head (783a395) 83.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #994      +/-   ##
==========================================
- Coverage   83.25%   83.01%   -0.24%     
==========================================
  Files          51       51              
  Lines        2060     2067       +7     
  Branches       71       74       +3     
==========================================
+ Hits         1715     1716       +1     
- Misses        330      333       +3     
- Partials       15       18       +3     
Flag Coverage Δ
solidity 79.61% <14.28%> (-1.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
contracts/src/storage/AssetsStorage.sol 100.00% <ø> (ø)
contracts/src/Assets.sol 65.71% <14.28%> (-12.86%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -96,6 +104,11 @@ library Assets {
revert InvalidToken();
}

if ($.registeredNativeTokens[token]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note here, if token creation fails on the substrate side mapping will be populated and stop a retry by re-submitting the registerToken. Someone would need to fix it manually on the substrate end.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good point! will remove this check.

@vgeddes vgeddes mentioned this pull request Nov 30, 2023
@vgeddes vgeddes closed this Nov 30, 2023
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.

4 participants