Skip to content

Commit

Permalink
fix tracing test
Browse files Browse the repository at this point in the history
  • Loading branch information
RomarQ committed Jun 20, 2024
1 parent 6ac72a6 commit 3255080
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions test/suites/tracing-tests/test-trace-ethereum-xcm-2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ describeSuite({
payload: xcmMessage,
} as RawXcmMessage);

// Create a new block to include the xcm message
await context.createBlock();

// By calling deployContract() a new block will be created,
// including the ethereum xcm call + regular ethereum transaction
const { contractAddress: eventEmitterAddress } = await context.deployContract!(
Expand All @@ -127,18 +124,18 @@ describeSuite({
]);
// 2 ethereum transactions: ethereum xcm call + regular ethereum transaction
expect(trace.length).to.eq(2);
// 1st transaction is xcm.
// - `From` is the descended origin.
// - `To` is the xcm contract address.
expect(trace[0].from).to.eq(ethereumXcmDescendedOrigin.toLowerCase());
expect(trace[0].to).to.eq(xcmContractAddress.toLowerCase());
expect(trace[0].type).to.eq("CALL");
// 2nd transaction is regular ethereum transaction.
// 1st transaction is regular ethereum transaction.
// - `From` is Alith's adddress.
// - `To` is the ethereum contract address.
expect(trace[1].from).to.eq(alith.address.toLowerCase());
expect(trace[1].to).to.eq(ethContractAddress.toLowerCase());
expect(trace[1].type).be.eq("CREATE");
expect(trace[0].from).to.eq(alith.address.toLowerCase());
expect(trace[0].to).to.eq(ethContractAddress.toLowerCase());
expect(trace[0].type).be.eq("CREATE");
// 2nd transaction is xcm.
// - `From` is the descended origin.
// - `To` is the xcm contract address.
expect(trace[1].from).to.eq(ethereumXcmDescendedOrigin.toLowerCase());
expect(trace[1].to).to.eq(xcmContractAddress.toLowerCase());
expect(trace[1].type).to.eq("CALL");
},
});
},
Expand Down

0 comments on commit 3255080

Please sign in to comment.