From cc6023b94dfcb2e224aac7c3ba255a8dc720a985 Mon Sep 17 00:00:00 2001 From: Bas van Gijzel Date: Fri, 29 Nov 2024 13:30:31 +0000 Subject: [PATCH 1/2] Make totalDifficulty field optional, as spec has changed. --- .../src/internal/core/jsonrpc/types/output/block.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/hardhat-core/src/internal/core/jsonrpc/types/output/block.ts b/packages/hardhat-core/src/internal/core/jsonrpc/types/output/block.ts index d0bd287748..97cf640291 100644 --- a/packages/hardhat-core/src/internal/core/jsonrpc/types/output/block.ts +++ b/packages/hardhat-core/src/internal/core/jsonrpc/types/output/block.ts @@ -27,7 +27,8 @@ const baseBlockResponse = { receiptsRoot: rpcHash, miner: rpcAddress, difficulty: rpcQuantity, - totalDifficulty: rpcQuantity, + // now optional since https://github.com/ethereum/execution-apis/pull/570 + totalDifficulty: optional(rpcQuantity), extraData: rpcData, size: rpcQuantity, gasLimit: rpcQuantity, From 56d127ba9fa7b5613999d20d22c314d326204dd0 Mon Sep 17 00:00:00 2001 From: Bas van Gijzel Date: Fri, 29 Nov 2024 13:32:04 +0000 Subject: [PATCH 2/2] Create serious-sloths-hug.md --- .changeset/serious-sloths-hug.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/serious-sloths-hug.md diff --git a/.changeset/serious-sloths-hug.md b/.changeset/serious-sloths-hug.md new file mode 100644 index 0000000000..5ed2ed81e1 --- /dev/null +++ b/.changeset/serious-sloths-hug.md @@ -0,0 +1,5 @@ +--- +"hardhat": patch +--- + +Make totalDifficulty field optional, as spec has changed.