-
Notifications
You must be signed in to change notification settings - Fork 41
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
Implement foreign asset transaction fees #1022
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main paritytech/substrate#1022 +/- ##
==========================================
- Coverage 94.50% 92.93% -1.58%
==========================================
Files 92 92
Lines 21070 21589 +519
==========================================
+ Hits 19913 20064 +151
- Misses 1157 1525 +368
Flags with carried forward coverage won't be shown. Click here to find out more. |
Please also update docs/changelog_for_devs.md |
runtime/common/src/fees.rs
Outdated
let _ = <Tokens as Balanced<AccountId>>::resolve( | ||
&TreasuryPalletId::get().into_account_truncating(), | ||
fees_and_tips, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug_assert!
would be useful here to know when funds are just lost.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, 5c028e0
To integrate asset fee payment for the front end, see this:
Also see this:
Follow up PR:
Use an actual swap with a liquidity pool from substrate to convert foreign into native token and then pay the fees with the following substrate functionality:
https://github.com/paritytech/substrate/tree/master/frame/asset-conversion
https://github.com/paritytech/substrate/blob/master/frame/transaction-payment/asset-conversion-tx-payment