Skip to content

Commit

Permalink
update transfer metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
nohaapav committed Dec 4, 2024
1 parent 4087d16 commit c191c99
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 53 deletions.
94 changes: 47 additions & 47 deletions integration-tests/xcm-test/src/__db__/metadata.db.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,55 +216,55 @@
}
},
"hydration-acala-aca": {
"updated": 1733156437625,
"updated": 1733231094021,
"destination": {
"fee": "0.0074712",
"feeAsset": "ACA",
"feeNative": "7471200000"
}
},
"hydration-acala-ldot": {
"updated": 1733156443040,
"updated": 1733231099110,
"destination": {
"fee": "0.0005535077",
"feeAsset": "LDOT",
"feeNative": "5535077"
}
},
"hydration-ajuna-ajun": {
"updated": 1733063852571,
"updated": 1733231107397,
"destination": {
"fee": "0.00028",
"feeAsset": "AJUN",
"feeNative": "280000000"
}
},
"hydration-assethub-dot": {
"updated": 1733156567945,
"updated": 1733231129796,
"destination": {
"fee": "0.1814465",
"feeAsset": "DOT",
"feeNative": "1814465000"
}
},
"hydration-assethub-usdt": {
"updated": 1733156572586,
"updated": 1733231133977,
"destination": {
"fee": "0.032246",
"fee": "0.03545",
"feeAsset": "USDT",
"feeNative": "32246"
"feeNative": "35450"
}
},
"hydration-assethub-usdc": {
"updated": 1733156576110,
"updated": 1733231137984,
"destination": {
"fee": "0.032339",
"fee": "0.03568",
"feeAsset": "USDC",
"feeNative": "32339"
"feeNative": "35680"
}
},
"hydration-assethub-pink": {
"updated": 1733156580032,
"updated": 1733235785113,
"destination": {
"fee": "0.18",
"feeAsset": "USDT",
Expand Down Expand Up @@ -296,239 +296,239 @@
}
},
"hydration-astar-astr": {
"updated": 1733156603228,
"updated": 1733231147912,
"destination": {
"fee": "0.038541720104787343",
"feeAsset": "ASTR",
"feeNative": "38541720104787343"
}
},
"hydration-astar-dot": {
"updated": 1733156612487,
"updated": 1733231155515,
"destination": {
"fee": "0.0442215927",
"feeAsset": "DOT",
"feeNative": "442215927"
}
},
"hydration-bifrost-bnc": {
"updated": 1733156617219,
"updated": 1733231177034,
"destination": {
"fee": "0.149429366457",
"feeAsset": "BNC",
"feeNative": "149429366457"
}
},
"hydration-bifrost-vdot": {
"updated": 1733156622540,
"updated": 1733231182149,
"destination": {
"fee": "0.0033105595",
"fee": "0.003269208",
"feeAsset": "vDOT",
"feeNative": "33105595"
"feeNative": "32692080"
}
},
"hydration-bifrost-vastr": {
"updated": 1733156627112,
"updated": 1733231188927,
"destination": {
"fee": "0.674563852359375",
"fee": "0.73194141653125",
"feeAsset": "vASTR",
"feeNative": "674563852359375000"
"feeNative": "731941416531250000"
}
},
"hydration-bifrost-dot": {
"updated": 1733156636362,
"updated": 1733231194769,
"destination": {
"fee": "0.0500524423",
"fee": "0.0499803752",
"feeAsset": "DOT",
"feeNative": "500524423"
"feeNative": "499803752"
}
},
"hydration-centrifuge-cfg": {
"updated": 1733156642716,
"updated": 1733231202624,
"destination": {
"fee": "0.0064296",
"feeAsset": "CFG",
"feeNative": "6429600000000000"
}
},
"hydration-crust-cru": {
"updated": 1733156648250,
"updated": 1733231214190,
"destination": {
"fee": "0.04",
"feeAsset": "CRU",
"feeNative": "40000000000"
}
},
"hydration-darwinia-ring": {
"updated": 1733156653942,
"updated": 1733231222476,
"destination": {
"fee": "0.040188403234362692",
"feeAsset": "RING",
"feeNative": "40188403234362692"
}
},
"hydration-interlay-ibtc": {
"updated": 1733156677280,
"updated": 1733231242918,
"destination": {
"fee": "0.00000063",
"feeAsset": "IBTC",
"feeNative": "63"
}
},
"hydration-interlay-intr": {
"updated": 1733156682769,
"updated": 1733231248601,
"destination": {
"fee": "0.0019213457",
"feeAsset": "INTR",
"feeNative": "19213457"
}
},
"hydration-interlay-dot": {
"updated": 1733156688251,
"updated": 1733231255406,
"destination": {
"fee": "0.045934345",
"feeAsset": "DOT",
"feeNative": "459343450"
}
},
"hydration-interlay-hdx": {
"updated": 1733156694036,
"updated": 1733231260400,
"destination": {
"fee": "0.405777777777",
"feeAsset": "HDX",
"feeNative": "405777777777"
}
},
"hydration-kilt-kilt": {
"updated": 1733156702456,
"updated": 1733231268234,
"destination": {
"fee": "0.000000000027609",
"feeAsset": "KILT",
"feeNative": "27609"
}
},
"hydration-moonbeam-hdx": {
"updated": 1733156716669,
"updated": 1733231284007,
"destination": {
"fee": "3.488962557199",
"feeAsset": "HDX",
"feeNative": "3488962557199"
}
},
"hydration-moonbeam-glmr": {
"updated": 1733156729924,
"updated": 1733231296479,
"destination": {
"fee": "0.0095040525",
"feeAsset": "GLMR",
"feeNative": "9504052500000000"
}
},
"hydration-moonbeam-dot": {
"updated": 1733156744338,
"updated": 1733231309933,
"destination": {
"fee": "0.0513335994",
"feeAsset": "DOT",
"feeNative": "513335994"
}
},
"hydration-moonbeam-dai_mwh": {
"updated": 1733156761409,
"updated": 1733231328952,
"destination": {
"fee": "0.08",
"feeAsset": "GLMR",
"feeNative": "80000000000000000"
}
},
"hydration-moonbeam-usdc_mwh": {
"updated": 1733156789831,
"updated": 1733231356028,
"destination": {
"fee": "0.08",
"feeAsset": "GLMR",
"feeNative": "80000000000000000"
}
},
"hydration-moonbeam-usdt_mwh": {
"updated": 1733156817932,
"updated": 1733231382064,
"destination": {
"fee": "0.08",
"feeAsset": "GLMR",
"feeNative": "80000000000000000"
}
},
"hydration-moonbeam-wbtc_mwh": {
"updated": 1733156853333,
"updated": 1733231408325,
"destination": {
"fee": "0.08",
"feeAsset": "GLMR",
"feeNative": "80000000000000000"
}
},
"hydration-moonbeam-weth_mwh": {
"updated": 1733156883729,
"updated": 1733231434563,
"destination": {
"fee": "0.08",
"feeAsset": "GLMR",
"feeNative": "80000000000000000"
}
},
"hydration-mythos-myth": {
"updated": 1733156889737,
"updated": 1733231441050,
"destination": {
"fee": "0.262144",
"feeAsset": "MYTH",
"feeNative": "262144000000000000"
}
},
"hydration-polkadot-dot": {
"updated": 1733156893574,
"updated": 1733248746130,
"destination": {
"fee": "0.0021232099",
"feeAsset": "DOT",
"feeNative": "21232099"
}
},
"hydration-pendulum-pen": {
"updated": 1733156943243,
"updated": 1733231458970,
"destination": {
"fee": "1",
"feeAsset": "PEN",
"feeNative": "1000000000000"
}
},
"hydration-subsocial-sub": {
"updated": 1733156959936,
"updated": 1733231464383,
"destination": {
"fee": "0.64",
"feeAsset": "SUB",
"feeNative": "6400000000"
}
},
"hydration-unique-unq": {
"updated": 1733156967416,
"updated": 1733231471319,
"destination": {
"fee": "0",
"feeAsset": "UNQ",
"feeNative": "0"
}
},
"hydration-zeitgeist-ztg": {
"updated": 1733157013333,
"updated": 1733231481376,
"destination": {
"fee": "0.0064296",
"feeAsset": "ZTG",
"feeNative": "64296000"
}
},
"hydration-zeitgeist-glmr": {
"updated": 1733157035280,
"updated": 1733231494825,
"destination": {
"fee": "0.0062726556",
"feeAsset": "GLMR",
"feeNative": "6272655600000000"
}
},
"hydration-zeitgeist-usdc_mwh": {
"updated": 1733157062218,
"updated": 1733231510160,
"destination": {
"fee": "0.1",
"feeAsset": "GLMR",
Expand Down
3 changes: 1 addition & 2 deletions integration-tests/xcm-test/src/ctx/e2e/xcm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ export const runXcm = (
const destEvents = await destNetwork.api.query.system.events();
expect(checkIfProcessed(destEvents)).toBeTruthy();

shouldSnapshot &&
expect([key, calldata.data]).toMatchSnapshot(SNAPSHOT_NAME);
shouldSnapshot && expect([key, calldata.data]).toMatchSnapshot();

const postTransfer = await getTransfer(
wallet,
Expand Down
16 changes: 12 additions & 4 deletions integration-tests/xcm-test/src/exec.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,19 @@ const getChainsCtx = (source: AnyChain, destination: AnyChain) => {
const relay = configService.getChain('polkadot');
const dex = configService.getChain('hydration');

const isDexTransfer = source.key === dex.key || destination.key === dex.key;
if (isDexTransfer) {
return [source, destination, relay] as Parachain[];
const base = [source, destination];

const isRelayTransfer = [source.key, destination.key].includes(relay.key);
if (!isRelayTransfer) {
base.push(relay);
}

const isDexTransfer = [source.key, destination.key].includes(dex.key);
if (!isDexTransfer) {
base.push(dex);
}
return [source, destination, relay, dex] as Parachain[];

return base as Parachain[];
};

describe('Wallet with XCM config', () => {
Expand Down

0 comments on commit c191c99

Please sign in to comment.