Implement `pallet-asset-rewards` (#3926)
Closes #3149 ## Description This PR introduces `pallet-asset-rewards`, which allows accounts to be rewarded for freezing `fungible` tokens. The motivation for creating this pallet is to allow incentivising LPs. See the pallet docs for more info about the pallet. ## Runtime changes The pallet has been added to - `asset-hub-rococo` - `asset-hub-westend` The `NativeAndAssets` `fungibles` Union did not contain `PoolAssets`, so it has been renamed `NativeAndNonPoolAssets` A new `fungibles` Union `NativeAndAllAssets` was created to encompass all assets and the native token. ## TODO - [x] Emulation tests - [x] Fill in Freeze logic (blocked https://github.com/paritytech/polkadot-sdk/issues/3342) and re-run benchmarks --------- Co-authored-by: command-bot <> Co-authored-by:Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
muharem <ismailov.m.h@gmail.com> Co-authored-by:
Guillaume Thiolliere <gui.thiolliere@gmail.com>
parent
412aca6c
Showing
- Cargo.lock 27 additions, 0 deletionsCargo.lock
- Cargo.toml 2 additions, 0 deletionsCargo.toml
- cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml 1 addition, 0 deletions...ated/chains/parachains/assets/asset-hub-rococo/Cargo.toml
- cumulus/parachains/integration-tests/emulated/common/src/lib.rs 2 additions, 0 deletions...s/parachains/integration-tests/emulated/common/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml 1 addition, 0 deletions...n-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs 2 additions, 1 deletion...n-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs 1 addition, 0 deletions...s/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reward_pool.rs 114 additions, 0 deletions...ed/tests/assets/asset-hub-rococo/src/tests/reward_pool.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml 1 addition, 0 deletions...-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs 6 additions, 2 deletions...-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs 1 addition, 0 deletions.../emulated/tests/assets/asset-hub-westend/src/tests/mod.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reward_pool.rs 113 additions, 0 deletions...d/tests/assets/asset-hub-westend/src/tests/reward_pool.rs
- cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml 5 additions, 0 deletions...us/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml
- cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs 128 additions, 14 deletions...us/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/mod.rs 1 addition, 0 deletions...hains/runtimes/assets/asset-hub-rococo/src/weights/mod.rs
- cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/pallet_asset_rewards.rs 217 additions, 0 deletions...sets/asset-hub-rococo/src/weights/pallet_asset_rewards.rs
- cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs 7 additions, 3 deletions...chains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs
- cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml 5 additions, 0 deletions...s/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
- cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs 130 additions, 14 deletions...s/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
- cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs 1 addition, 0 deletions...ains/runtimes/assets/asset-hub-westend/src/weights/mod.rs
Please register or sign in to comment