Skip to content

Commit

Permalink
1171 xorless fee part 2 (#1290)
Browse files Browse the repository at this point in the history
* add check for depth

* change assets in migration

* compute fee for order book and vested transfer

* update Carrgo.lock

* add set referrer

---------

Co-authored-by: Vladimir Stepanenko <vovac12@gmail.com>
  • Loading branch information
ZlayaMorda and vovac12 authored Dec 20, 2024
1 parent fe65505 commit 0a49922
Show file tree
Hide file tree
Showing 3 changed files with 385 additions and 77 deletions.
12 changes: 0 additions & 12 deletions pallets/xor-fee/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ pub mod add_white_listed_assets_for_xorless_fee {
where
T: Config,
{
// TODO: change assets
fn on_runtime_upgrade() -> Weight {
let assets: Vec<AssetIdOf<T>> = vec![
KXOR.into(),
ETH.into(),
KUSD.into(),
APOLLO_ASSET_ID.into(),
Expand All @@ -96,21 +94,11 @@ pub mod add_white_listed_assets_for_xorless_fee {
.into(), // LLD
PSWAP.into(),
DAI.into(),
AssetId32::from_bytes(hex!(
"002d4e9e03f192cc33b128319a049f353db98fbf4d98f717fd0b7f66a0462142"
))
.into(), // HMX
XSTUSD.into(),
AssetId32::from_bytes(hex!(
"0003b1dbee890acfb1b3bc12d1bb3b4295f52755423f84d1751b2545cebf000b"
))
.into(), //DOT
AssetId32::from_bytes(hex!(
"00f2f4fda40a4bf1fc3769d156fa695532eec31e265d75068524462c0b80f674"
))
.into(), //DEO
KSM.into(),
TBCD.into(),
AssetId32::from_bytes(hex!(
"00ab83f36ff0cbbdd12fd88a094818820eaf155c08c4159969f1fb21534c1eb0"
))
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ pub struct BaseCallFilter;

impl Contains<RuntimeCall> for BaseCallFilter {
fn contains(call: &RuntimeCall) -> bool {
if call.swap_count() > 1 {
let depth_result = call.swap_count_and_depth(0);
if depth_result.swap_count > 1 || depth_result.depth > 1 {
return false;
}
if matches!(
Expand Down
Loading

0 comments on commit 0a49922

Please sign in to comment.