Skip to content

Commit

Permalink
fix: resolves #2340
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed May 30, 2024
1 parent 007405e commit b6fd573
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nervous-students-vanish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

Added `getAction` to `writeContracts`.
7 changes: 6 additions & 1 deletion src/experimental/eip5792/actions/writeContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
type EncodeFunctionDataErrorType,
encodeFunctionData,
} from '../../../utils/abi/encodeFunctionData.js'
import { getAction } from '../../../utils/getAction.js'
import {
type SendCallsErrorType,
type SendCallsParameters,
Expand Down Expand Up @@ -118,7 +119,11 @@ export async function writeContracts<
value,
} satisfies SendCallsParameters['calls'][number]
})
return sendCalls(client, { ...parameters, calls } as SendCallsParameters)
return getAction(
client,
sendCalls,
'sendCalls',
)({ ...parameters, calls } as SendCallsParameters)
}

export type WriteContractFunctionParameters<
Expand Down

0 comments on commit b6fd573

Please sign in to comment.