Skip to content

Commit 003b231

Browse files
authored
feat: support eth_fillTransaction (#4098)
* feat: support fillTransaction * w * decorator * decorator * chore: changeset
1 parent b73095e commit 003b231

24 files changed

+2558
-967
lines changed

.changeset/beige-vans-move.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": minor
3+
---
4+
5+
Hooked up `eth_fillTransaction` routing to `prepareTransactionRequest`, to reduce the RPC calls required to prepare a local transaction from 3-4, to 1 (if `eth_fillTransaction` is supported by the execution node).

.changeset/modern-eggs-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": minor
3+
---
4+
5+
Added `fillTransaction` action for `eth_fillTransaction` support.

pnpm-lock.yaml

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ catalog:
77
'@types/react-dom': ^19
88
react: ^19
99
react-dom: ^19
10-
typescript: ^5.9.2
10+
typescript: 5.9.2
1111
minimumReleaseAge: 1440
1212
minimumReleaseAgeExclude:
1313
- '@vitest/*'
14-
- glob
14+
- glob
1515
- hono
1616
- vitest
1717
- vocs

src/actions/index.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ test('exports actions', () => {
2727
"estimateFeesPerGas": [Function],
2828
"estimateGas": [Function],
2929
"estimateMaxPriorityFeePerGas": [Function],
30+
"fillTransaction": [Function],
3031
"getAddresses": [Function],
3132
"getAutomine": [Function],
3233
"getBalance": [Function],

src/actions/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ export {
8787
type EstimateMaxPriorityFeePerGasReturnType,
8888
estimateMaxPriorityFeePerGas,
8989
} from './public/estimateMaxPriorityFeePerGas.js'
90+
export {
91+
type FillTransactionErrorType,
92+
type FillTransactionParameters,
93+
type FillTransactionReturnType,
94+
fillTransaction,
95+
} from './public/fillTransaction.js'
9096
export {
9197
type GetBalanceErrorType,
9298
type GetBalanceParameters,

0 commit comments

Comments
 (0)