|
1 | 1 | import { expect } from 'bun:test';
|
2 |
| -import { DEFAULT_TOPIC, FEE_AMOUNT, WETH_ADDRESS, WETH_AMOUNT } from '@/constants'; |
| 2 | +import { DEFAULT_TOPIC, ETH_AMOUNT, FEE_AMOUNT, WETH_ADDRESS } from '@/constants'; |
3 | 3 | import type { BridgerHubManagaer } from '@/managers/BridgeHubManager';
|
4 | 4 | import type { PolimecManager } from '@/managers/PolimecManager';
|
5 | 5 | import type { PolkadotHubManager } from '@/managers/PolkadotHubManager';
|
@@ -102,7 +102,10 @@ export class BridgeToPolimecTransfer extends BaseTransferTest {
|
102 | 102 | (event) => event.type === 'ForeignAssets' && event.value.type === 'Issued',
|
103 | 103 | );
|
104 | 104 |
|
105 |
| - // TODO: Check why we have 3 events instead of 2 (WETH + DOT). Curently we have 3 events (WETH + DOT + DOT) |
| 105 | + console.log('Issued Events on Destination: \n'); |
| 106 | + console.dir(issuedEventsOnDest, { depth: null }); |
| 107 | + |
| 108 | + // TODO: Check why we have 3 events instead of 2 (ETH + DOT). Curently we have 3 events (ETH + DOT + DOT) |
106 | 109 | expect(issuedEventsOnDest.length).toBe(3);
|
107 | 110 |
|
108 | 111 | return { sourceBlock, destBlock };
|
@@ -147,15 +150,11 @@ export class BridgeToPolimecTransfer extends BaseTransferTest {
|
147 | 150 | {
|
148 | 151 | id: XcmV3MultiassetAssetId.Concrete({
|
149 | 152 | parents: 2,
|
150 |
| - interior: XcmV3Junctions.X2([ |
| 153 | + interior: XcmV3Junctions.X1( |
151 | 154 | XcmV3Junction.GlobalConsensus(XcmV3JunctionNetworkId.Ethereum({ chain_id: 1n })),
|
152 |
| - XcmV3Junction.AccountKey20({ |
153 |
| - network: undefined, |
154 |
| - key: FixedSizeBinary.fromHex(WETH_ADDRESS), |
155 |
| - }), |
156 |
| - ]), |
| 155 | + ), |
157 | 156 | }),
|
158 |
| - fun: XcmV3MultiassetFungibility.Fungible(WETH_AMOUNT), |
| 157 | + fun: XcmV3MultiassetFungibility.Fungible(ETH_AMOUNT), |
159 | 158 | },
|
160 | 159 | ]),
|
161 | 160 |
|
@@ -190,15 +189,11 @@ export class BridgeToPolimecTransfer extends BaseTransferTest {
|
190 | 189 | {
|
191 | 190 | id: XcmV3MultiassetAssetId.Concrete({
|
192 | 191 | parents: 2,
|
193 |
| - interior: XcmV3Junctions.X2([ |
| 192 | + interior: XcmV3Junctions.X1( |
194 | 193 | XcmV3Junction.GlobalConsensus(XcmV3JunctionNetworkId.Ethereum({ chain_id: 1n })),
|
195 |
| - XcmV3Junction.AccountKey20({ |
196 |
| - network: undefined, |
197 |
| - key: FixedSizeBinary.fromHex(WETH_ADDRESS), |
198 |
| - }), |
199 |
| - ]), |
| 194 | + ), |
200 | 195 | }),
|
201 |
| - fun: XcmV3MultiassetFungibility.Fungible(WETH_AMOUNT), |
| 196 | + fun: XcmV3MultiassetFungibility.Fungible(ETH_AMOUNT), |
202 | 197 | },
|
203 | 198 | ]),
|
204 | 199 | dest: {
|
@@ -250,15 +245,11 @@ export class BridgeToPolimecTransfer extends BaseTransferTest {
|
250 | 245 | {
|
251 | 246 | id: XcmV3MultiassetAssetId.Concrete({
|
252 | 247 | parents: 2,
|
253 |
| - interior: XcmV3Junctions.X2([ |
| 248 | + interior: XcmV3Junctions.X1( |
254 | 249 | XcmV3Junction.GlobalConsensus(XcmV3JunctionNetworkId.Ethereum({ chain_id: 1n })),
|
255 |
| - XcmV3Junction.AccountKey20({ |
256 |
| - network: undefined, |
257 |
| - key: FixedSizeBinary.fromHex(WETH_ADDRESS), |
258 |
| - }), |
259 |
| - ]), |
| 250 | + ), |
260 | 251 | }),
|
261 |
| - fun: XcmV3MultiassetFungibility.Fungible(WETH_AMOUNT), |
| 252 | + fun: XcmV3MultiassetFungibility.Fungible(ETH_AMOUNT), |
262 | 253 | },
|
263 | 254 | ]),
|
264 | 255 |
|
|
0 commit comments