Skip to content

Commit

Permalink
Fix transaction receipt return type (#7159)
Browse files Browse the repository at this point in the history
* add default array to block.transactions

* update

* update

* update

* update changelog

---------

Co-authored-by: CI <ci@github.com>
  • Loading branch information
luu-alex and gfidlab-ci-user authored Jul 22, 2024
1 parent cbcfc18 commit 5f6deeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/web3-eth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,5 @@ Documentation:

### Fixed

- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151)
- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151)
- Change method `getTransactionReceipt` to not be casted as `TransactionReceipt` to give proper return type (#7159)
3 changes: 1 addition & 2 deletions packages/web3-eth/src/rpc_method_wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,14 +521,13 @@ export async function getTransactionReceipt<ReturnFormat extends DataFormat>(
}

}

return isNullish(response)
? response
: (format(
transactionReceiptSchema,
response as unknown as TransactionReceipt,
returnFormat ?? web3Context.defaultReturnFormat,
) as TransactionReceipt);
));
}

/**
Expand Down

1 comment on commit 5f6deeb

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 5f6deeb Previous: cbcfc18 Ratio
processingTx 9233 ops/sec (±3.97%) 9153 ops/sec (±4.31%) 0.99
processingContractDeploy 40168 ops/sec (±4.88%) 40380 ops/sec (±6.17%) 1.01
processingContractMethodSend 16302 ops/sec (±6.45%) 16446 ops/sec (±6.81%) 1.01
processingContractMethodCall 28306 ops/sec (±6.19%) 27283 ops/sec (±7.60%) 0.96
abiEncode 42794 ops/sec (±8.67%) 46030 ops/sec (±6.70%) 1.08
abiDecode 31117 ops/sec (±7.21%) 30377 ops/sec (±7.33%) 0.98
sign 1588 ops/sec (±0.64%) 1557 ops/sec (±0.83%) 0.98
verify 367 ops/sec (±0.70%) 371 ops/sec (±0.36%) 1.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.