Asset Hub: Asset Conversion and Swap Weight Trader#218
Conversation
|
@joepetrowski need your help to set there parameters:
I think we can have |
|
We decided to set both as Liquidity withdrawal fee can also be |
joepetrowski
left a comment
There was a problem hiding this comment.
Some minor nits but looking good. One question, XCM V3 is used throughout, but since SDK v1.7.0 we are on XCM v4. Do these types need to be updated here?
I didn't look too closely at the bridge test cases. Would be good if @acatangiu can check those.
| // TODO: the types in the module copied from the PR: https://github.com/paritytech/polkadot-sdk/pull/3250 | ||
| // and should be removed when changes from the PR will get released. |
Reviewed tests and all of them look good! Before finishing full review, I had an early question: are we adding the DEX/pools on both Kusama and Polkadot at the same time? I was under the impression Polkadot was to get it one release later than Kusama.. |
This has been on Kusama for like 6 months :) |
Ok, sorry, I posted the early question too early (before even looking at the runtimes code) :)) |
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Sergej Sakac <73715684+Szegoo@users.noreply.github.com>
|
@joepetrowski I have updated the deposits/fees. Plus for |
…ion-and-weight-trader
bkontur
left a comment
There was a problem hiding this comment.
lgmt, just left a few nits to check
| } | ||
|
|
||
| #[test] | ||
| fn receive_reserve_asset_deposited_dot_from_asset_hub_polkadot_fees_paid_by_pool_swap_works() { |
| /// | ||
| /// The `PoolId` is represented as a tuple of `AssetKind`s with `FirstAsset` always positioned | ||
| /// as the first element. | ||
| pub struct WithFirstAsset<FirstAsset, AccountId, AssetKind, AccountIdConverter>( |
There was a problem hiding this comment.
what about the AssetHubKusama? It uses pallet_asset_conversion::WithFirstAsset, should we change it there also?
There was a problem hiding this comment.
only possible with migration, which will be available for the next release
| parameter_types! { | ||
| pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon"); | ||
| pub const LiquidityWithdrawalFee: Permill = Permill::from_percent(0); | ||
| pub const PoolSetupFee: Balance = system_para_deposit(1, 4); |
There was a problem hiding this comment.
what about AssetHubKusama? There is still:
type PoolSetupFee = ConstU128<0>; // Asset class deposit fees are sufficient to prevent spam
shouldn't we change AHK also?
There was a problem hiding this comment.
set it as in polkadot
| // TODO: the types in the module copied from the PR: https://github.com/paritytech/polkadot-sdk/pull/3250 | ||
| // and should be removed when changes from the PR will get released. |
| // --extrinsic=* | ||
| // --wasm-execution=compiled | ||
| // --heap-pages=4096 | ||
| // --output=./asset-hub-kusama-weights |
There was a problem hiding this comment.
when merged, I will regenerate weights as a part of #223
|
@acatangiu can you please help with review |
| type AssetDeposit = ConstU128<0>; | ||
| type AssetAccountDeposit = AssetAccountDeposit; | ||
| type MetadataDepositBase = ConstU128<0>; | ||
| type MetadataDepositPerByte = ConstU128<0>; |
There was a problem hiding this comment.
Only the system (the AC pallet) can actually create assets within this instance of Assets, so only the system itself could actually create any assets and add any metadata.
|
@muharem is this ready to be merged? |
yes |
|
/merge |
There was a problem running the action.❌😵❌ Please find more information in the logs. |
|
/merge |
There was a problem running the action.❌😵❌ Please find more information in the logs. |
Asset Conversion instance for Polkadot Asset Hub and XCM Swap Weight Trader for both Asset Hubs.
TODO: