Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwolff committed Apr 13, 2023
1 parent d99292e commit 5740c37
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contracts/integration-test/L1MessageQueue.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,15 @@ describe("L1MessageQueue", async () => {
}
}
});
it("should give example transaction hash to match to geth", async () => {
const sender = hexlify("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266");
const target = hexlify("0x70997970C51812dc3A010C7d01b50e0d17dc79C8");
const nonce = BigNumber.from(1);
const value = BigNumber.from(2);
const gasLimit = BigNumber.from(3);
const data = Uint8Array.from([1, 2, 3, 4]);

const computedHash = await queue.computeTransactionHash(sender, nonce, value, target, gasLimit, data);
expect(computedHash).to.eq("0x1cebed6d90ef618f60eec1b7edc0df36b298a237c219f0950081acfb72eac6be");
});
});

1 comment on commit 5740c37

@maxwolff
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corresponding test is here: scroll-tech/go-ethereum#269

Please sign in to comment.