Skip to content

Commit

Permalink
feat: up generic ordering on ERC-7821
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Jan 1, 2025
1 parent 2ebd93f commit 8cd4642
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-forks-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

**Experimental(ERC-7821):** Updated generic ordering on `execute`.
4 changes: 2 additions & 2 deletions src/experimental/erc7821/actions/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import {
import { supportsExecutionMode } from './supportsExecutionMode.js'

export type ExecuteParameters<
calls extends readonly unknown[] = readonly unknown[],
chain extends Chain | undefined = Chain | undefined,
account extends Account | undefined = Account | undefined,
chainOverride extends Chain | undefined = Chain | undefined,
calls extends readonly unknown[] = readonly unknown[],
_derivedChain extends Chain | undefined = DeriveChain<chain, chainOverride>,
> = UnionEvaluate<
UnionPick<
Expand Down Expand Up @@ -149,7 +149,7 @@ export async function execute<
chainOverride extends Chain | undefined = undefined,
>(
client: Client<Transport, chain, account>,
parameters: ExecuteParameters<chain, account, chainOverride, calls>,
parameters: ExecuteParameters<calls, chain, account, chainOverride>,
): Promise<ExecuteReturnType> {
const { address, authorizationList, opData } = parameters

Expand Down
2 changes: 1 addition & 1 deletion src/experimental/erc7821/decorators/erc7821.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export type Erc7821Actions<
const calls extends readonly unknown[],
chainOverride extends Chain | undefined = undefined,
>(
parameters: ExecuteParameters<chain, account, chainOverride, calls>,
parameters: ExecuteParameters<calls, chain, account, chainOverride>,
) => Promise<ExecuteReturnType>
/**
* Checks if the contract supports the ERC-7821 execution mode.
Expand Down

0 comments on commit 8cd4642

Please sign in to comment.