Statemint runtimes to accept sufficient assets as xcm fee payment (#1278)
* point to my branch * girazoki-add-TakeFirstAssetTrader-to-utility * Commit lock * point at custom branch * add new trader to statemine runtimes * compiles * Back to master * Update last tomls * Imports up * remove non-needing imports * FMT * log messages properly * Use TakeRevenue instead of HandleCredit * Introduce xcm fee handler * check total supply in tests * FMT * fix test * Start decoupling balance calculation into different traits * Make traits a bit more generic * PR suggestions * add import * import well * Place xcmfeesassethandler into parachains common * fix tests * config parameters * Min amount to fee receiver * Make minimum amount for block author to be at least the ED * Doc in AssetFeeAsExistentialDepositMultiplier * saturating sub * make sure we dont enter twice * FMT * fmt again * adapt tests * Add doc and struct for weight refund * Doc * More doc * PR suggestions * store all info related to asset payment as multiasset * return AssetNotFound instead of TooExpensive * Use asset transactor to deposit fee * uninstall from statemint * R for RUntime and CON for BalanceConverter * Rework logic to avoid unnecesary match and error * Rework ED check, also in case of refund * rework typo * In case refund makes drop below ED, just refund the difference * fix test westmint * clone id * move test imports to preamble * move test imports to preamble * test-utils with builderS * lock file updated * remove unused imports Co-authored-by:Stephen Shelton <steve@brewcraft.org> Co-authored-by:
joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by:
joepetrowski <joe@parity.io>
Showing
- cumulus/Cargo.lock 27 additions, 0 deletionscumulus/Cargo.lock
- cumulus/parachains/common/Cargo.toml 4 additions, 0 deletionscumulus/parachains/common/Cargo.toml
- cumulus/parachains/common/src/xcm_config.rs 42 additions, 1 deletioncumulus/parachains/common/src/xcm_config.rs
- cumulus/parachains/runtimes/assets/statemine/Cargo.toml 1 addition, 0 deletionscumulus/parachains/runtimes/assets/statemine/Cargo.toml
- cumulus/parachains/runtimes/assets/statemine/src/xcm_config.rs 29 additions, 4 deletions...us/parachains/runtimes/assets/statemine/src/xcm_config.rs
- cumulus/parachains/runtimes/assets/statemine/tests/tests.rs 301 additions, 0 deletionscumulus/parachains/runtimes/assets/statemine/tests/tests.rs
- cumulus/parachains/runtimes/assets/statemint/Cargo.toml 1 addition, 0 deletionscumulus/parachains/runtimes/assets/statemint/Cargo.toml
- cumulus/parachains/runtimes/assets/statemint/src/xcm_config.rs 2 additions, 1 deletion...us/parachains/runtimes/assets/statemint/src/xcm_config.rs
- cumulus/parachains/runtimes/assets/statemint/tests/tests.rs 71 additions, 0 deletionscumulus/parachains/runtimes/assets/statemint/tests/tests.rs
- cumulus/parachains/runtimes/assets/test-utils/Cargo.toml 45 additions, 0 deletionscumulus/parachains/runtimes/assets/test-utils/Cargo.toml
- cumulus/parachains/runtimes/assets/test-utils/src/lib.rs 134 additions, 0 deletionscumulus/parachains/runtimes/assets/test-utils/src/lib.rs
- cumulus/parachains/runtimes/assets/westmint/Cargo.toml 1 addition, 0 deletionscumulus/parachains/runtimes/assets/westmint/Cargo.toml
- cumulus/parachains/runtimes/assets/westmint/src/xcm_config.rs 29 additions, 4 deletions...lus/parachains/runtimes/assets/westmint/src/xcm_config.rs
- cumulus/parachains/runtimes/assets/westmint/tests/tests.rs 300 additions, 0 deletionscumulus/parachains/runtimes/assets/westmint/tests/tests.rs
- cumulus/primitives/utility/Cargo.toml 5 additions, 0 deletionscumulus/primitives/utility/Cargo.toml
- cumulus/primitives/utility/src/lib.rs 217 additions, 1 deletioncumulus/primitives/utility/src/lib.rs
Please register or sign in to comment