Skip to content

Commit

Permalink
feat: update getPaymasterData to match ERC-7677 spec.
Browse files Browse the repository at this point in the history
Co-Authored-By: Bingbing Li <[email protected]>
  • Loading branch information
jxom and bingbingbl committed Sep 7, 2024
1 parent f345803 commit 9de10f8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/cyan-paws-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"viem": patch
---

**Account Abstraction:** Updated `getPaymasterData` + `getPaymasterStubData` return types to match ERC-7677 specification.
6 changes: 4 additions & 2 deletions src/account-abstraction/actions/paymaster/getPaymasterData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export type GetPaymasterDataParameters = OneOf<
| 'sender'
| 'preVerificationGas'
| 'verificationGasLimit'
| 'paymasterPostOpGasLimit'
| 'paymasterVerificationGasLimit'
>,
| 'callGasLimit'
| 'factory'
Expand All @@ -67,8 +69,8 @@ export type GetPaymasterDataReturnType = Prettify<
| {
paymaster: Address
paymasterData: Hex
paymasterVerificationGasLimit: bigint
paymasterPostOpGasLimit: bigint
paymasterPostOpGasLimit?: bigint | undefined
paymasterVerificationGasLimit?: bigint | undefined
}
>
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export type GetPaymasterStubDataReturnType = Prettify<
| {
paymaster: Address
paymasterData: Hex
paymasterVerificationGasLimit: bigint
paymasterVerificationGasLimit?: bigint | undefined
paymasterPostOpGasLimit: bigint
}
> & {
Expand Down

0 comments on commit 9de10f8

Please sign in to comment.