Skip to content

Commit 5a08f61

Browse files
committed
Some README clarifications
1 parent 5127edc commit 5a08f61

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,14 @@ curl "https://paymaster.base.org" \
4747
}
4848
'
4949
```
50-
3. Call estimate gas on your bundler of choice.
51-
4. Add some headroom to make room for the paymaster verification gas. In our testing we've found the following values work, but it would depend on your bundler:
50+
3. If the request is successful and the response contains a hex-encoded byte array, use that as the `paymasterAndData` field in the userOp for gas estimation in step 4.
51+
Note that this is a dummy signature that won't be accepted by the paymaster, except for gas estimation.
52+
If an error is returned or the result is empty, the paymaster is not available for the given operation or chain. You can stop here and choose to proceed with another paymaster or self-funding the user operation.
53+
4. Call estimate gas on your bundler of choice.
54+
5. Add some headroom to make room for additional paymaster verification gas. In our testing we've found the following values work, but it would depend on your bundler:
5255
1. `op.PreVerificationGas = estimate.PreVerificationGas + 2000`
5356
2. `op.VerificationGasLimit = estimate.VerificationGasLimit + 4000`
54-
5. Call `eth_paymasterAndDataForUserOperation` JSON-RPC method on https://paymaster.base.org. Parameters:
57+
6. Call `eth_paymasterAndDataForUserOperation` JSON-RPC method on https://paymaster.base.org. Parameters:
5558
1. `Object` - the unsigned user operation
5659
2. `string` - the address of the entrypoint contract
5760
3. `string` - the chain ID, in hexadecimal
@@ -81,8 +84,8 @@ curl "https://paymaster.base.org" \
8184
}
8285
'
8386
```
84-
6. If the request is successful and the response contains a hex-encoded byte array, use that as the `paymasterAndData` field in the userOp.
87+
7. If the request is successful and the response contains a hex-encoded byte array, use that as the `paymasterAndData` field in the userOp.
8588
If an error is returned or the result is empty, the paymaster is not available for the given operation or chain. You can choose to proceed with another paymaster or self-funding the user operation.
86-
7. Sign the user operation, and submit to your bundler of choice.
89+
8. Sign the user operation, and submit to your bundler of choice.
8790

88-
Note that the `paymasterAndData` returned in step 4 contains a signature of the provided userOp, so any modification of the userOp post step 4 (except for the `sig` field) will result in the paymaster rejecting the operation.
91+
Note that the `paymasterAndData` returned in step 6 contains a signature of the provided userOp, so any modification of the userOp post step 6 (except for the `sig` field) will result in the paymaster rejecting the operation.

0 commit comments

Comments
 (0)