diff --git a/src/schemas/transaction.yaml b/src/schemas/transaction.yaml index 06625db..35de4a3 100644 --- a/src/schemas/transaction.yaml +++ b/src/schemas/transaction.yaml @@ -317,17 +317,12 @@ UserOperation: required: - sender - nonce - - initCode - callData - callGasLimit - verificationGasLimit - preVerificationGas - maxFeePerGas - maxPriorityFeePerGas - - paymaster - - paymasterVerificationGasLimit - - paymasterPostOpGasLimit - - paymasterData - signature properties: sender: @@ -336,8 +331,11 @@ UserOperation: nonce: title: nonce $ref: '#/components/schemas/uint' - initCode: - title: initCode + factory: + title: factory + $ref: '#/components/schemas/address' + factoryData: + title: factoryData $ref: '#/components/schemas/bytes' callData: title: callData @@ -377,6 +375,22 @@ UserOperation: signature: title: signature $ref: '#/components/schemas/bytes' + allOf: + - if: + anyOf: + - properties: + paymaster: { } + - properties: + paymasterData: { } + - properties: + paymasterPostOpGasLimit: { } + - properties: + paymasterVerificationGasLimit: { } + then: + required: ["paymaster", "paymasterData", "paymasterPostOpGasLimit", "paymasterVerificationGasLimit"] + dependencies: + factory: ["factoryData"] + factoryData: ["factory"] GasInfo: type: object title: UserOperation Gas parameters