Skip to content

Commit

Permalink
Update viem, fix gas estimation in viem test
Browse files Browse the repository at this point in the history
Fixes #78, since this was fixed in upstream viem in version 2.9.9
  • Loading branch information
ezdac committed Apr 10, 2024
1 parent ac78eb4 commit 73158a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e_test/js-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions e2e_test/js-tests/test_viem_tx.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,21 @@ describe("viem send tx", () => {
serializedTransaction: signature,
});
const receipt = await publicClient.waitForTransactionReceipt({ hash });
assert.equal(receipt.status, 'success', "receipt status 'failure'")
}).timeout(10_000);

it("send tx with gas estimation and check receipt", async () => {
const request = await walletClient.prepareTransactionRequest({
account,
to: "0x00000000000000000000000000000000DeaDBeef",
value: 1,
});
const signature = await walletClient.signTransaction(request);
const hash = await walletClient.sendRawTransaction({
serializedTransaction: signature,
});
const receipt = await publicClient.waitForTransactionReceipt({ hash });
assert.equal(receipt.status, 'success', "receipt status 'failure'")
}).timeout(10_000);

it("send fee currency tx and check receipt", async () => {
Expand All @@ -124,6 +139,7 @@ describe("viem send tx", () => {
serializedTransaction: signature,
});
const receipt = await publicClient.waitForTransactionReceipt({ hash });
assert.equal(receipt.status, 'success', "receipt status 'failure'")
}).timeout(10_000);

it("send overlapping nonce tx in different currencies", async () => {
Expand Down

0 comments on commit 73158a0

Please sign in to comment.