-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## What? Allow extrinsic fee payment with AssetHub assets that have a price in the oracle ## Why? Needed for OTM flow ## How? - Add the pallet_asset_tx_payment which is tightly coupled to pallet_transaction_payment. - It gets the PLMC fee required for an extrinsic, and converts it to the asset from pallet_assets with our own custom logic. ## Testing? In the next PR ## Anything Else? - There already were some existing generic structs that implemented this logic, but they assumed the tip and fee to go to the same place. Since we want the fee to go to the Blockchain Operation Treasury, and the tip to go to the block author, we had to reimplement most logic. - The original struct was `FungiblesAdapter<CON, HC>`. where CON was the converter and HC the crediting of the fee. Our solution copies that, but also implements a third generic, such that the second pays the fee-tip, and the third the fee. For more info check `pallet_asset_tx_payment::payment::FungiblesAdapter`
- Loading branch information
Showing
10 changed files
with
198 additions
and
38 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#[test] | ||
fn fee_paid_with_foreign_assets() { | ||
todo!(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.