Skip to content

Commit

Permalink
Merge pull request #181 from pimlicolabs/add-missing-receipt-fields
Browse files Browse the repository at this point in the history
add missing fields to getUserOperationReceipt response
  • Loading branch information
plusminushalf authored Apr 29, 2024
2 parents 959353e + 04e34ad commit b0bc745
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/old-timers-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"permissionless": patch
---

Added missing entryPoint, paymaster and reason types in user operation receipt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ export type GetUserOperationReceiptParameters = {

export type GetUserOperationReceiptReturnType = {
userOpHash: Hash
entryPoint: Address
sender: Address
nonce: bigint
paymaster?: Address
actualGasUsed: bigint
actualGasCost: bigint
success: boolean
reason?: string
receipt: {
transactionHash: Hex
transactionIndex: bigint
Expand Down Expand Up @@ -93,11 +96,14 @@ export const getUserOperationReceipt = async <

const userOperationReceipt: GetUserOperationReceiptReturnType = {
userOpHash: response.userOpHash,
entryPoint: response.entryPoint,
sender: response.sender,
nonce: BigInt(response.nonce),
paymaster: response.paymaster,
actualGasUsed: BigInt(response.actualGasUsed),
actualGasCost: BigInt(response.actualGasCost),
success: response.success,
reason: response.reason,
receipt: {
transactionHash: response.receipt.transactionHash,
transactionIndex: BigInt(response.receipt.transactionIndex),
Expand Down
3 changes: 3 additions & 0 deletions packages/permissionless/types/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ export type BundlerRpcSchema<entryPoint extends EntryPoint> = [

type UserOperationReceiptWithBigIntAsHex = {
userOpHash: Hash
entryPoint: Address
sender: Address
nonce: Hex
paymaster?: Address
actualGasUsed: Hex
actualGasCost: Hex
success: boolean
reason?: string
receipt: {
transactionHash: Hex
transactionIndex: Hex
Expand Down

0 comments on commit b0bc745

Please sign in to comment.