From eefe1ebb31b12de95f37c5207d9bf5127d8b0f11 Mon Sep 17 00:00:00 2001 From: "moxey.eth" Date: Wed, 10 Apr 2024 16:44:03 +1000 Subject: [PATCH 1/2] fix: tests --- src/op-stack/formatters.test.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/op-stack/formatters.test.ts b/src/op-stack/formatters.test.ts index 75e13d764a..ef143e8ed3 100644 --- a/src/op-stack/formatters.test.ts +++ b/src/op-stack/formatters.test.ts @@ -6,6 +6,8 @@ import { getBlock } from '../actions/public/getBlock.js' import { getTransaction } from '../actions/public/getTransaction.js' import { getTransactionReceipt } from '../actions/public/getTransactionReceipt.js' import { optimism } from '../chains/index.js' +import { createClient } from '../clients/createClient.js' +import { http } from '../clients/transports/http.js' describe('block', () => { test('formatter', async () => { @@ -575,7 +577,12 @@ describe('transaction receipt', async () => { }) test('action', async () => { - const transaction = await getTransactionReceipt(optimismClient, { + const client = createClient({ + chain: optimism, + transport: http(), + }) + + const transaction = await getTransactionReceipt(client, { hash: '0x4d8f0ebd260ea5ac2e11886cdd0af8cba982b21d9f9c1efad808212c6d6a65d3', }) From 981bcff59c9c29ce3f479934dc1550fc9c2bd806 Mon Sep 17 00:00:00 2001 From: Vitor Date: Mon, 14 Oct 2024 19:29:34 -0300 Subject: [PATCH 2/2] docs: remove broken example --- site/pages/docs/actions/public/getTransactionCount.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/site/pages/docs/actions/public/getTransactionCount.md b/site/pages/docs/actions/public/getTransactionCount.md index ab2b029ce2..53947005e3 100644 --- a/site/pages/docs/actions/public/getTransactionCount.md +++ b/site/pages/docs/actions/public/getTransactionCount.md @@ -47,7 +47,7 @@ const transactionCount = await publicClient.getTransactionCount({ }) ``` -### blockNumber +### blockNumber (optional) - **Type:** `bigint` @@ -62,7 +62,7 @@ const transactionCount = await publicClient.getTransactionCount({ }) ``` -### blockTag +### blockTag (optional) - **Type:** `'latest' | 'earliest' | 'pending' | 'safe' | 'finalized'` @@ -81,10 +81,6 @@ const transactionCount = await publicClient.getTransactionCount({ - The transaction count of an account can also be used as a nonce. -## Example - - - ## JSON-RPC Method [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount)