@pimlico/mock-paymaster 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/_cjs/constants.js +61 -0
- package/_cjs/constants.js.map +1 -0
- package/_cjs/helpers/abi.js +728 -727
- package/_cjs/helpers/abi.js.map +1 -1
- package/_cjs/helpers/erc20-utils.js +15 -14
- package/_cjs/helpers/erc20-utils.js.map +1 -1
- package/_cjs/helpers/schema.js +39 -6
- package/_cjs/helpers/schema.js.map +1 -1
- package/_cjs/helpers/utils.js +29 -7
- package/_cjs/helpers/utils.js.map +1 -1
- package/_cjs/index.js +10 -9
- package/_cjs/index.js.map +1 -1
- package/_cjs/relay.js +92 -100
- package/_cjs/relay.js.map +1 -1
- package/_cjs/singletonPaymasters.js +161 -207
- package/_cjs/singletonPaymasters.js.map +1 -1
- package/_esm/constants.js +55 -0
- package/_esm/constants.js.map +1 -0
- package/_esm/helpers/abi.js +727 -726
- package/_esm/helpers/abi.js.map +1 -1
- package/_esm/helpers/erc20-utils.js +14 -13
- package/_esm/helpers/erc20-utils.js.map +1 -1
- package/_esm/helpers/schema.js +39 -6
- package/_esm/helpers/schema.js.map +1 -1
- package/_esm/helpers/utils.js +29 -8
- package/_esm/helpers/utils.js.map +1 -1
- package/_esm/index.js +12 -11
- package/_esm/index.js.map +1 -1
- package/_esm/relay.js +98 -103
- package/_esm/relay.js.map +1 -1
- package/_esm/singletonPaymasters.js +171 -213
- package/_esm/singletonPaymasters.js.map +1 -1
- package/_types/constants.d.ts +18 -0
- package/_types/constants.d.ts.map +1 -0
- package/_types/helpers/abi.d.ts +917 -435
- package/_types/helpers/abi.d.ts.map +1 -1
- package/_types/helpers/erc20-utils.d.ts +1 -1
- package/_types/helpers/erc20-utils.d.ts.map +1 -1
- package/_types/helpers/schema.d.ts +1716 -68
- package/_types/helpers/schema.d.ts.map +1 -1
- package/_types/helpers/utils.d.ts +3 -2
- package/_types/helpers/utils.d.ts.map +1 -1
- package/_types/index.d.ts.map +1 -1
- package/_types/relay.d.ts +38 -27
- package/_types/relay.d.ts.map +1 -1
- package/_types/singletonPaymasters.d.ts +25 -93259
- package/_types/singletonPaymasters.d.ts.map +1 -1
- package/constants.ts +84 -0
- package/helpers/abi.ts +728 -726
- package/helpers/erc20-utils.ts +16 -15
- package/helpers/schema.ts +41 -6
- package/helpers/utils.ts +38 -13
- package/index.ts +11 -24
- package/package.json +4 -4
- package/relay.ts +164 -192
- package/singletonPaymasters.ts +218 -280
package/helpers/abi.ts
CHANGED
|
@@ -1,1046 +1,1048 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const singletonPaymaster06Abi = [
|
|
2
2
|
{
|
|
3
|
-
|
|
3
|
+
inputs: [
|
|
4
|
+
{ internalType: "address", name: "_entryPoint", type: "address" },
|
|
5
|
+
{ internalType: "address", name: "_owner", type: "address" },
|
|
6
|
+
{ internalType: "address[]", name: "_signers", type: "address[]" }
|
|
7
|
+
],
|
|
8
|
+
stateMutability: "nonpayable",
|
|
9
|
+
type: "constructor"
|
|
10
|
+
},
|
|
11
|
+
{ inputs: [], name: "ECDSAInvalidSignature", type: "error" },
|
|
12
|
+
{
|
|
13
|
+
inputs: [{ internalType: "uint256", name: "length", type: "uint256" }],
|
|
14
|
+
name: "ECDSAInvalidSignatureLength",
|
|
15
|
+
type: "error"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
inputs: [{ internalType: "bytes32", name: "s", type: "bytes32" }],
|
|
19
|
+
name: "ECDSAInvalidSignatureS",
|
|
20
|
+
type: "error"
|
|
21
|
+
},
|
|
22
|
+
{ inputs: [], name: "ExchangeRateInvalid", type: "error" },
|
|
23
|
+
{
|
|
24
|
+
inputs: [{ internalType: "address", name: "owner", type: "address" }],
|
|
25
|
+
name: "OwnableInvalidOwner",
|
|
26
|
+
type: "error"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
inputs: [{ internalType: "address", name: "account", type: "address" }],
|
|
30
|
+
name: "OwnableUnauthorizedAccount",
|
|
31
|
+
type: "error"
|
|
32
|
+
},
|
|
33
|
+
{ inputs: [], name: "PaymasterAndDataLengthInvalid", type: "error" },
|
|
34
|
+
{ inputs: [], name: "PaymasterConfigLengthInvalid", type: "error" },
|
|
35
|
+
{ inputs: [], name: "PaymasterModeInvalid", type: "error" },
|
|
36
|
+
{ inputs: [], name: "PaymasterSignatureLengthInvalid", type: "error" },
|
|
37
|
+
{
|
|
38
|
+
inputs: [{ internalType: "string", name: "msg", type: "string" }],
|
|
39
|
+
name: "PostOpTransferFromFailed",
|
|
40
|
+
type: "error"
|
|
41
|
+
},
|
|
42
|
+
{ inputs: [], name: "TokenAddressInvalid", type: "error" },
|
|
43
|
+
{
|
|
44
|
+
anonymous: false,
|
|
4
45
|
inputs: [
|
|
5
46
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
name: "_owner",
|
|
12
|
-
type: "address",
|
|
13
|
-
internalType: "address"
|
|
47
|
+
indexed: true,
|
|
48
|
+
internalType: "address",
|
|
49
|
+
name: "previousOwner",
|
|
50
|
+
type: "address"
|
|
14
51
|
},
|
|
15
52
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
53
|
+
indexed: true,
|
|
54
|
+
internalType: "address",
|
|
55
|
+
name: "newOwner",
|
|
56
|
+
type: "address"
|
|
19
57
|
}
|
|
20
58
|
],
|
|
21
|
-
|
|
59
|
+
name: "OwnershipTransferred",
|
|
60
|
+
type: "event"
|
|
22
61
|
},
|
|
23
62
|
{
|
|
24
|
-
|
|
25
|
-
name: "addSigner",
|
|
63
|
+
anonymous: false,
|
|
26
64
|
inputs: [
|
|
27
65
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
66
|
+
indexed: false,
|
|
67
|
+
internalType: "address",
|
|
68
|
+
name: "signer",
|
|
69
|
+
type: "address"
|
|
31
70
|
}
|
|
32
71
|
],
|
|
33
|
-
|
|
34
|
-
|
|
72
|
+
name: "SignerAdded",
|
|
73
|
+
type: "event"
|
|
35
74
|
},
|
|
36
75
|
{
|
|
37
|
-
|
|
38
|
-
name: "addStake",
|
|
76
|
+
anonymous: false,
|
|
39
77
|
inputs: [
|
|
40
78
|
{
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
79
|
+
indexed: false,
|
|
80
|
+
internalType: "address",
|
|
81
|
+
name: "signer",
|
|
82
|
+
type: "address"
|
|
44
83
|
}
|
|
45
84
|
],
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
type: "function",
|
|
51
|
-
name: "deposit",
|
|
52
|
-
inputs: [],
|
|
53
|
-
outputs: [],
|
|
54
|
-
stateMutability: "payable"
|
|
85
|
+
name: "SignerRemoved",
|
|
86
|
+
type: "event"
|
|
55
87
|
},
|
|
56
88
|
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
inputs: [],
|
|
60
|
-
outputs: [
|
|
89
|
+
anonymous: false,
|
|
90
|
+
inputs: [
|
|
61
91
|
{
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
92
|
+
indexed: false,
|
|
93
|
+
internalType: "address",
|
|
94
|
+
name: "oldTreasury",
|
|
95
|
+
type: "address"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
indexed: false,
|
|
99
|
+
internalType: "address",
|
|
100
|
+
name: "newTreasury",
|
|
101
|
+
type: "address"
|
|
65
102
|
}
|
|
66
103
|
],
|
|
67
|
-
|
|
104
|
+
name: "TreasuryUpdated",
|
|
105
|
+
type: "event"
|
|
68
106
|
},
|
|
69
107
|
{
|
|
70
|
-
|
|
71
|
-
name: "getCostInToken",
|
|
108
|
+
anonymous: false,
|
|
72
109
|
inputs: [
|
|
73
110
|
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
111
|
+
indexed: true,
|
|
112
|
+
internalType: "bytes32",
|
|
113
|
+
name: "userOpHash",
|
|
114
|
+
type: "bytes32"
|
|
77
115
|
},
|
|
78
116
|
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
117
|
+
indexed: true,
|
|
118
|
+
internalType: "address",
|
|
119
|
+
name: "user",
|
|
120
|
+
type: "address"
|
|
82
121
|
},
|
|
83
122
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
123
|
+
indexed: false,
|
|
124
|
+
internalType: "uint8",
|
|
125
|
+
name: "paymasterMode",
|
|
126
|
+
type: "uint8"
|
|
87
127
|
},
|
|
88
128
|
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
outputs: [
|
|
129
|
+
indexed: false,
|
|
130
|
+
internalType: "address",
|
|
131
|
+
name: "token",
|
|
132
|
+
type: "address"
|
|
133
|
+
},
|
|
95
134
|
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
135
|
+
indexed: false,
|
|
136
|
+
internalType: "uint256",
|
|
137
|
+
name: "tokenAmountPaid",
|
|
138
|
+
type: "uint256"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
indexed: false,
|
|
142
|
+
internalType: "uint256",
|
|
143
|
+
name: "exchangeRate",
|
|
144
|
+
type: "uint256"
|
|
99
145
|
}
|
|
100
146
|
],
|
|
101
|
-
|
|
147
|
+
name: "UserOperationSponsored",
|
|
148
|
+
type: "event"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
inputs: [{ internalType: "address", name: "_signer", type: "address" }],
|
|
152
|
+
name: "addSigner",
|
|
153
|
+
outputs: [],
|
|
154
|
+
stateMutability: "nonpayable",
|
|
155
|
+
type: "function"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
inputs: [
|
|
159
|
+
{ internalType: "uint32", name: "unstakeDelaySec", type: "uint32" }
|
|
160
|
+
],
|
|
161
|
+
name: "addStake",
|
|
162
|
+
outputs: [],
|
|
163
|
+
stateMutability: "payable",
|
|
164
|
+
type: "function"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
inputs: [],
|
|
168
|
+
name: "deposit",
|
|
169
|
+
outputs: [],
|
|
170
|
+
stateMutability: "payable",
|
|
171
|
+
type: "function"
|
|
102
172
|
},
|
|
103
173
|
{
|
|
104
|
-
type: "function",
|
|
105
|
-
name: "getDeposit",
|
|
106
174
|
inputs: [],
|
|
175
|
+
name: "entryPoint",
|
|
107
176
|
outputs: [
|
|
108
|
-
{
|
|
109
|
-
name: "",
|
|
110
|
-
type: "uint256",
|
|
111
|
-
internalType: "uint256"
|
|
112
|
-
}
|
|
177
|
+
{ internalType: "contract IEntryPoint", name: "", type: "address" }
|
|
113
178
|
],
|
|
114
|
-
stateMutability: "view"
|
|
179
|
+
stateMutability: "view",
|
|
180
|
+
type: "function"
|
|
115
181
|
},
|
|
116
182
|
{
|
|
117
|
-
type: "function",
|
|
118
|
-
name: "getHash",
|
|
119
183
|
inputs: [
|
|
120
184
|
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
185
|
+
internalType: "uint256",
|
|
186
|
+
name: "_actualGasCost",
|
|
187
|
+
type: "uint256"
|
|
124
188
|
},
|
|
189
|
+
{ internalType: "uint256", name: "_postOpGas", type: "uint256" },
|
|
190
|
+
{
|
|
191
|
+
internalType: "uint256",
|
|
192
|
+
name: "_actualUserOpFeePerGas",
|
|
193
|
+
type: "uint256"
|
|
194
|
+
},
|
|
195
|
+
{ internalType: "uint256", name: "_exchangeRate", type: "uint256" }
|
|
196
|
+
],
|
|
197
|
+
name: "getCostInToken",
|
|
198
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
199
|
+
stateMutability: "pure",
|
|
200
|
+
type: "function"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
inputs: [],
|
|
204
|
+
name: "getDeposit",
|
|
205
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
206
|
+
stateMutability: "view",
|
|
207
|
+
type: "function"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
inputs: [
|
|
211
|
+
{ internalType: "uint8", name: "_mode", type: "uint8" },
|
|
125
212
|
{
|
|
126
|
-
name: "_userOp",
|
|
127
|
-
type: "tuple",
|
|
128
|
-
internalType: "struct PackedUserOperation",
|
|
129
213
|
components: [
|
|
130
214
|
{
|
|
215
|
+
internalType: "address",
|
|
131
216
|
name: "sender",
|
|
132
|
-
type: "address"
|
|
133
|
-
internalType: "address"
|
|
217
|
+
type: "address"
|
|
134
218
|
},
|
|
219
|
+
{ internalType: "uint256", name: "nonce", type: "uint256" },
|
|
220
|
+
{ internalType: "bytes", name: "initCode", type: "bytes" },
|
|
221
|
+
{ internalType: "bytes", name: "callData", type: "bytes" },
|
|
135
222
|
{
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
223
|
+
internalType: "uint256",
|
|
224
|
+
name: "callGasLimit",
|
|
225
|
+
type: "uint256"
|
|
139
226
|
},
|
|
140
227
|
{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
name: "callData",
|
|
147
|
-
type: "bytes",
|
|
148
|
-
internalType: "bytes"
|
|
228
|
+
internalType: "uint256",
|
|
229
|
+
name: "verificationGasLimit",
|
|
230
|
+
type: "uint256"
|
|
149
231
|
},
|
|
150
232
|
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
233
|
+
internalType: "uint256",
|
|
234
|
+
name: "preVerificationGas",
|
|
235
|
+
type: "uint256"
|
|
154
236
|
},
|
|
155
237
|
{
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
238
|
+
internalType: "uint256",
|
|
239
|
+
name: "maxFeePerGas",
|
|
240
|
+
type: "uint256"
|
|
159
241
|
},
|
|
160
242
|
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
243
|
+
internalType: "uint256",
|
|
244
|
+
name: "maxPriorityFeePerGas",
|
|
245
|
+
type: "uint256"
|
|
164
246
|
},
|
|
165
247
|
{
|
|
248
|
+
internalType: "bytes",
|
|
166
249
|
name: "paymasterAndData",
|
|
167
|
-
type: "bytes"
|
|
168
|
-
internalType: "bytes"
|
|
250
|
+
type: "bytes"
|
|
169
251
|
},
|
|
170
|
-
{
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
],
|
|
178
|
-
outputs: [
|
|
179
|
-
{
|
|
180
|
-
name: "",
|
|
181
|
-
type: "bytes32",
|
|
182
|
-
internalType: "bytes32"
|
|
252
|
+
{ internalType: "bytes", name: "signature", type: "bytes" }
|
|
253
|
+
],
|
|
254
|
+
internalType: "struct UserOperation",
|
|
255
|
+
name: "_userOp",
|
|
256
|
+
type: "tuple"
|
|
183
257
|
}
|
|
184
258
|
],
|
|
185
|
-
|
|
259
|
+
name: "getHash",
|
|
260
|
+
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
261
|
+
stateMutability: "view",
|
|
262
|
+
type: "function"
|
|
186
263
|
},
|
|
187
264
|
{
|
|
188
|
-
type: "function",
|
|
189
|
-
name: "owner",
|
|
190
265
|
inputs: [],
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
internalType: "address"
|
|
196
|
-
}
|
|
197
|
-
],
|
|
198
|
-
stateMutability: "view"
|
|
266
|
+
name: "owner",
|
|
267
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
268
|
+
stateMutability: "view",
|
|
269
|
+
type: "function"
|
|
199
270
|
},
|
|
200
271
|
{
|
|
201
|
-
type: "function",
|
|
202
|
-
name: "postOp",
|
|
203
272
|
inputs: [
|
|
204
|
-
{
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
internalType: "enum PostOpMode"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
name: "context",
|
|
211
|
-
type: "bytes",
|
|
212
|
-
internalType: "bytes"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
name: "actualGasCost",
|
|
216
|
-
type: "uint256",
|
|
217
|
-
internalType: "uint256"
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
name: "actualUserOpFeePerGas",
|
|
221
|
-
type: "uint256",
|
|
222
|
-
internalType: "uint256"
|
|
223
|
-
}
|
|
273
|
+
{ internalType: "enum PostOpMode", name: "mode", type: "uint8" },
|
|
274
|
+
{ internalType: "bytes", name: "context", type: "bytes" },
|
|
275
|
+
{ internalType: "uint256", name: "actualGasCost", type: "uint256" }
|
|
224
276
|
],
|
|
277
|
+
name: "postOp",
|
|
225
278
|
outputs: [],
|
|
226
|
-
stateMutability: "nonpayable"
|
|
279
|
+
stateMutability: "nonpayable",
|
|
280
|
+
type: "function"
|
|
227
281
|
},
|
|
228
282
|
{
|
|
229
|
-
type: "
|
|
283
|
+
inputs: [{ internalType: "address", name: "_signer", type: "address" }],
|
|
230
284
|
name: "removeSigner",
|
|
231
|
-
inputs: [
|
|
232
|
-
{
|
|
233
|
-
name: "_signer",
|
|
234
|
-
type: "address",
|
|
235
|
-
internalType: "address"
|
|
236
|
-
}
|
|
237
|
-
],
|
|
238
285
|
outputs: [],
|
|
239
|
-
stateMutability: "nonpayable"
|
|
286
|
+
stateMutability: "nonpayable",
|
|
287
|
+
type: "function"
|
|
240
288
|
},
|
|
241
289
|
{
|
|
242
|
-
type: "function",
|
|
243
|
-
name: "renounceOwnership",
|
|
244
290
|
inputs: [],
|
|
291
|
+
name: "renounceOwnership",
|
|
245
292
|
outputs: [],
|
|
246
|
-
stateMutability: "nonpayable"
|
|
293
|
+
stateMutability: "nonpayable",
|
|
294
|
+
type: "function"
|
|
247
295
|
},
|
|
248
296
|
{
|
|
249
|
-
type: "function",
|
|
250
|
-
name: "setTreasury",
|
|
251
297
|
inputs: [
|
|
252
|
-
{
|
|
253
|
-
name: "_treasury",
|
|
254
|
-
type: "address",
|
|
255
|
-
internalType: "address"
|
|
256
|
-
}
|
|
298
|
+
{ internalType: "address", name: "_treasury", type: "address" }
|
|
257
299
|
],
|
|
300
|
+
name: "setTreasury",
|
|
258
301
|
outputs: [],
|
|
259
|
-
stateMutability: "nonpayable"
|
|
302
|
+
stateMutability: "nonpayable",
|
|
303
|
+
type: "function"
|
|
260
304
|
},
|
|
261
305
|
{
|
|
262
|
-
type: "
|
|
306
|
+
inputs: [{ internalType: "address", name: "account", type: "address" }],
|
|
263
307
|
name: "signers",
|
|
264
|
-
inputs: [
|
|
265
|
-
{
|
|
266
|
-
name: "account",
|
|
267
|
-
type: "address",
|
|
268
|
-
internalType: "address"
|
|
269
|
-
}
|
|
270
|
-
],
|
|
271
308
|
outputs: [
|
|
272
|
-
{
|
|
273
|
-
name: "isValidSigner",
|
|
274
|
-
type: "bool",
|
|
275
|
-
internalType: "bool"
|
|
276
|
-
}
|
|
309
|
+
{ internalType: "bool", name: "isValidSigner", type: "bool" }
|
|
277
310
|
],
|
|
278
|
-
stateMutability: "view"
|
|
311
|
+
stateMutability: "view",
|
|
312
|
+
type: "function"
|
|
279
313
|
},
|
|
280
314
|
{
|
|
281
|
-
type: "function",
|
|
282
|
-
name: "transferOwnership",
|
|
283
315
|
inputs: [
|
|
284
|
-
{
|
|
285
|
-
name: "newOwner",
|
|
286
|
-
type: "address",
|
|
287
|
-
internalType: "address"
|
|
288
|
-
}
|
|
316
|
+
{ internalType: "address", name: "newOwner", type: "address" }
|
|
289
317
|
],
|
|
318
|
+
name: "transferOwnership",
|
|
290
319
|
outputs: [],
|
|
291
|
-
stateMutability: "nonpayable"
|
|
320
|
+
stateMutability: "nonpayable",
|
|
321
|
+
type: "function"
|
|
292
322
|
},
|
|
293
323
|
{
|
|
294
|
-
type: "function",
|
|
295
|
-
name: "treasury",
|
|
296
324
|
inputs: [],
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
internalType: "address"
|
|
302
|
-
}
|
|
303
|
-
],
|
|
304
|
-
stateMutability: "view"
|
|
325
|
+
name: "treasury",
|
|
326
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
327
|
+
stateMutability: "view",
|
|
328
|
+
type: "function"
|
|
305
329
|
},
|
|
306
330
|
{
|
|
307
|
-
type: "function",
|
|
308
|
-
name: "unlockStake",
|
|
309
331
|
inputs: [],
|
|
332
|
+
name: "unlockStake",
|
|
310
333
|
outputs: [],
|
|
311
|
-
stateMutability: "nonpayable"
|
|
334
|
+
stateMutability: "nonpayable",
|
|
335
|
+
type: "function"
|
|
312
336
|
},
|
|
313
337
|
{
|
|
314
|
-
type: "function",
|
|
315
|
-
name: "validatePaymasterUserOp",
|
|
316
338
|
inputs: [
|
|
317
339
|
{
|
|
318
|
-
name: "userOp",
|
|
319
|
-
type: "tuple",
|
|
320
|
-
internalType: "struct PackedUserOperation",
|
|
321
340
|
components: [
|
|
322
341
|
{
|
|
342
|
+
internalType: "address",
|
|
323
343
|
name: "sender",
|
|
324
|
-
type: "address"
|
|
325
|
-
internalType: "address"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
name: "nonce",
|
|
329
|
-
type: "uint256",
|
|
330
|
-
internalType: "uint256"
|
|
344
|
+
type: "address"
|
|
331
345
|
},
|
|
346
|
+
{ internalType: "uint256", name: "nonce", type: "uint256" },
|
|
347
|
+
{ internalType: "bytes", name: "initCode", type: "bytes" },
|
|
348
|
+
{ internalType: "bytes", name: "callData", type: "bytes" },
|
|
332
349
|
{
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
350
|
+
internalType: "uint256",
|
|
351
|
+
name: "callGasLimit",
|
|
352
|
+
type: "uint256"
|
|
336
353
|
},
|
|
337
354
|
{
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
355
|
+
internalType: "uint256",
|
|
356
|
+
name: "verificationGasLimit",
|
|
357
|
+
type: "uint256"
|
|
341
358
|
},
|
|
342
359
|
{
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
360
|
+
internalType: "uint256",
|
|
361
|
+
name: "preVerificationGas",
|
|
362
|
+
type: "uint256"
|
|
346
363
|
},
|
|
347
364
|
{
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
365
|
+
internalType: "uint256",
|
|
366
|
+
name: "maxFeePerGas",
|
|
367
|
+
type: "uint256"
|
|
351
368
|
},
|
|
352
369
|
{
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
370
|
+
internalType: "uint256",
|
|
371
|
+
name: "maxPriorityFeePerGas",
|
|
372
|
+
type: "uint256"
|
|
356
373
|
},
|
|
357
374
|
{
|
|
375
|
+
internalType: "bytes",
|
|
358
376
|
name: "paymasterAndData",
|
|
359
|
-
type: "bytes"
|
|
360
|
-
internalType: "bytes"
|
|
377
|
+
type: "bytes"
|
|
361
378
|
},
|
|
362
|
-
{
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
]
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
name: "userOpHash",
|
|
371
|
-
type: "bytes32",
|
|
372
|
-
internalType: "bytes32"
|
|
379
|
+
{ internalType: "bytes", name: "signature", type: "bytes" }
|
|
380
|
+
],
|
|
381
|
+
internalType: "struct UserOperation",
|
|
382
|
+
name: "userOp",
|
|
383
|
+
type: "tuple"
|
|
373
384
|
},
|
|
374
|
-
{
|
|
375
|
-
|
|
376
|
-
type: "uint256",
|
|
377
|
-
internalType: "uint256"
|
|
378
|
-
}
|
|
385
|
+
{ internalType: "bytes32", name: "userOpHash", type: "bytes32" },
|
|
386
|
+
{ internalType: "uint256", name: "maxCost", type: "uint256" }
|
|
379
387
|
],
|
|
388
|
+
name: "validatePaymasterUserOp",
|
|
380
389
|
outputs: [
|
|
381
|
-
{
|
|
382
|
-
|
|
383
|
-
type: "bytes",
|
|
384
|
-
internalType: "bytes"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
name: "validationData",
|
|
388
|
-
type: "uint256",
|
|
389
|
-
internalType: "uint256"
|
|
390
|
-
}
|
|
390
|
+
{ internalType: "bytes", name: "context", type: "bytes" },
|
|
391
|
+
{ internalType: "uint256", name: "validationData", type: "uint256" }
|
|
391
392
|
],
|
|
392
|
-
stateMutability: "nonpayable"
|
|
393
|
+
stateMutability: "nonpayable",
|
|
394
|
+
type: "function"
|
|
393
395
|
},
|
|
394
396
|
{
|
|
395
|
-
type: "function",
|
|
396
|
-
name: "withdrawStake",
|
|
397
397
|
inputs: [
|
|
398
398
|
{
|
|
399
|
+
internalType: "address payable",
|
|
399
400
|
name: "withdrawAddress",
|
|
400
|
-
type: "address"
|
|
401
|
-
internalType: "address payable"
|
|
401
|
+
type: "address"
|
|
402
402
|
}
|
|
403
403
|
],
|
|
404
|
+
name: "withdrawStake",
|
|
404
405
|
outputs: [],
|
|
405
|
-
stateMutability: "nonpayable"
|
|
406
|
+
stateMutability: "nonpayable",
|
|
407
|
+
type: "function"
|
|
406
408
|
},
|
|
407
409
|
{
|
|
408
|
-
type: "function",
|
|
409
|
-
name: "withdrawTo",
|
|
410
410
|
inputs: [
|
|
411
411
|
{
|
|
412
|
+
internalType: "address payable",
|
|
412
413
|
name: "withdrawAddress",
|
|
413
|
-
type: "address"
|
|
414
|
-
internalType: "address payable"
|
|
414
|
+
type: "address"
|
|
415
415
|
},
|
|
416
|
-
{
|
|
417
|
-
name: "amount",
|
|
418
|
-
type: "uint256",
|
|
419
|
-
internalType: "uint256"
|
|
420
|
-
}
|
|
416
|
+
{ internalType: "uint256", name: "amount", type: "uint256" }
|
|
421
417
|
],
|
|
418
|
+
name: "withdrawTo",
|
|
422
419
|
outputs: [],
|
|
423
|
-
stateMutability: "nonpayable"
|
|
424
|
-
|
|
420
|
+
stateMutability: "nonpayable",
|
|
421
|
+
type: "function"
|
|
422
|
+
}
|
|
423
|
+
] as const
|
|
424
|
+
|
|
425
|
+
export const singletonPaymaster07Abi = [
|
|
425
426
|
{
|
|
426
|
-
type: "
|
|
427
|
-
name: "OwnershipTransferred",
|
|
427
|
+
type: "constructor",
|
|
428
428
|
inputs: [
|
|
429
429
|
{
|
|
430
|
-
name: "
|
|
430
|
+
name: "_entryPoint",
|
|
431
431
|
type: "address",
|
|
432
|
-
indexed: true,
|
|
433
432
|
internalType: "address"
|
|
434
433
|
},
|
|
435
434
|
{
|
|
436
|
-
name: "
|
|
435
|
+
name: "_owner",
|
|
437
436
|
type: "address",
|
|
438
|
-
indexed: true,
|
|
439
437
|
internalType: "address"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: "_signers",
|
|
441
|
+
type: "address[]",
|
|
442
|
+
internalType: "address[]"
|
|
440
443
|
}
|
|
441
444
|
],
|
|
442
|
-
|
|
445
|
+
stateMutability: "nonpayable"
|
|
443
446
|
},
|
|
444
447
|
{
|
|
445
|
-
type: "
|
|
446
|
-
name: "
|
|
448
|
+
type: "function",
|
|
449
|
+
name: "addSigner",
|
|
447
450
|
inputs: [
|
|
448
451
|
{
|
|
449
|
-
name: "
|
|
452
|
+
name: "_signer",
|
|
450
453
|
type: "address",
|
|
451
|
-
indexed: false,
|
|
452
454
|
internalType: "address"
|
|
453
455
|
}
|
|
454
456
|
],
|
|
455
|
-
|
|
457
|
+
outputs: [],
|
|
458
|
+
stateMutability: "nonpayable"
|
|
456
459
|
},
|
|
457
460
|
{
|
|
458
|
-
type: "
|
|
459
|
-
name: "
|
|
461
|
+
type: "function",
|
|
462
|
+
name: "addStake",
|
|
460
463
|
inputs: [
|
|
461
464
|
{
|
|
462
|
-
name: "
|
|
463
|
-
type: "
|
|
464
|
-
|
|
465
|
-
internalType: "address"
|
|
465
|
+
name: "unstakeDelaySec",
|
|
466
|
+
type: "uint32",
|
|
467
|
+
internalType: "uint32"
|
|
466
468
|
}
|
|
467
469
|
],
|
|
468
|
-
|
|
470
|
+
outputs: [],
|
|
471
|
+
stateMutability: "payable"
|
|
469
472
|
},
|
|
470
473
|
{
|
|
471
|
-
type: "
|
|
472
|
-
name: "
|
|
473
|
-
inputs: [
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
474
|
+
type: "function",
|
|
475
|
+
name: "deposit",
|
|
476
|
+
inputs: [],
|
|
477
|
+
outputs: [],
|
|
478
|
+
stateMutability: "payable"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
type: "function",
|
|
482
|
+
name: "entryPoint",
|
|
483
|
+
inputs: [],
|
|
484
|
+
outputs: [
|
|
480
485
|
{
|
|
481
|
-
name: "
|
|
486
|
+
name: "",
|
|
482
487
|
type: "address",
|
|
483
|
-
|
|
484
|
-
internalType: "address"
|
|
488
|
+
internalType: "contract IEntryPoint"
|
|
485
489
|
}
|
|
486
490
|
],
|
|
487
|
-
|
|
491
|
+
stateMutability: "view"
|
|
488
492
|
},
|
|
489
493
|
{
|
|
490
|
-
type: "
|
|
491
|
-
name: "
|
|
494
|
+
type: "function",
|
|
495
|
+
name: "getCostInToken",
|
|
492
496
|
inputs: [
|
|
493
497
|
{
|
|
494
|
-
name: "
|
|
495
|
-
type: "
|
|
496
|
-
|
|
497
|
-
internalType: "bytes32"
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
name: "user",
|
|
501
|
-
type: "address",
|
|
502
|
-
indexed: true,
|
|
503
|
-
internalType: "address"
|
|
498
|
+
name: "_actualGasCost",
|
|
499
|
+
type: "uint256",
|
|
500
|
+
internalType: "uint256"
|
|
504
501
|
},
|
|
505
502
|
{
|
|
506
|
-
name: "
|
|
507
|
-
type: "
|
|
508
|
-
|
|
509
|
-
internalType: "uint8"
|
|
503
|
+
name: "_postOpGas",
|
|
504
|
+
type: "uint256",
|
|
505
|
+
internalType: "uint256"
|
|
510
506
|
},
|
|
511
507
|
{
|
|
512
|
-
name: "
|
|
513
|
-
type: "
|
|
514
|
-
|
|
515
|
-
internalType: "address"
|
|
508
|
+
name: "_actualUserOpFeePerGas",
|
|
509
|
+
type: "uint256",
|
|
510
|
+
internalType: "uint256"
|
|
516
511
|
},
|
|
517
512
|
{
|
|
518
|
-
name: "
|
|
513
|
+
name: "_exchangeRate",
|
|
519
514
|
type: "uint256",
|
|
520
|
-
indexed: false,
|
|
521
515
|
internalType: "uint256"
|
|
522
|
-
}
|
|
516
|
+
}
|
|
517
|
+
],
|
|
518
|
+
outputs: [
|
|
523
519
|
{
|
|
524
|
-
name: "
|
|
520
|
+
name: "",
|
|
525
521
|
type: "uint256",
|
|
526
|
-
indexed: false,
|
|
527
522
|
internalType: "uint256"
|
|
528
523
|
}
|
|
529
524
|
],
|
|
530
|
-
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
type: "error",
|
|
534
|
-
name: "ECDSAInvalidSignature",
|
|
535
|
-
inputs: []
|
|
525
|
+
stateMutability: "pure"
|
|
536
526
|
},
|
|
537
527
|
{
|
|
538
|
-
type: "
|
|
539
|
-
name: "
|
|
540
|
-
inputs: [
|
|
528
|
+
type: "function",
|
|
529
|
+
name: "getDeposit",
|
|
530
|
+
inputs: [],
|
|
531
|
+
outputs: [
|
|
541
532
|
{
|
|
542
|
-
name: "
|
|
533
|
+
name: "",
|
|
543
534
|
type: "uint256",
|
|
544
535
|
internalType: "uint256"
|
|
545
536
|
}
|
|
546
|
-
]
|
|
537
|
+
],
|
|
538
|
+
stateMutability: "view"
|
|
547
539
|
},
|
|
548
540
|
{
|
|
549
|
-
type: "
|
|
550
|
-
name: "
|
|
541
|
+
type: "function",
|
|
542
|
+
name: "getHash",
|
|
551
543
|
inputs: [
|
|
552
544
|
{
|
|
553
|
-
name: "
|
|
545
|
+
name: "_mode",
|
|
546
|
+
type: "uint8",
|
|
547
|
+
internalType: "uint8"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
name: "_userOp",
|
|
551
|
+
type: "tuple",
|
|
552
|
+
internalType: "struct PackedUserOperation",
|
|
553
|
+
components: [
|
|
554
|
+
{
|
|
555
|
+
name: "sender",
|
|
556
|
+
type: "address",
|
|
557
|
+
internalType: "address"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
name: "nonce",
|
|
561
|
+
type: "uint256",
|
|
562
|
+
internalType: "uint256"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
name: "initCode",
|
|
566
|
+
type: "bytes",
|
|
567
|
+
internalType: "bytes"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
name: "callData",
|
|
571
|
+
type: "bytes",
|
|
572
|
+
internalType: "bytes"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
name: "accountGasLimits",
|
|
576
|
+
type: "bytes32",
|
|
577
|
+
internalType: "bytes32"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
name: "preVerificationGas",
|
|
581
|
+
type: "uint256",
|
|
582
|
+
internalType: "uint256"
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
name: "gasFees",
|
|
586
|
+
type: "bytes32",
|
|
587
|
+
internalType: "bytes32"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
name: "paymasterAndData",
|
|
591
|
+
type: "bytes",
|
|
592
|
+
internalType: "bytes"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
name: "signature",
|
|
596
|
+
type: "bytes",
|
|
597
|
+
internalType: "bytes"
|
|
598
|
+
}
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
outputs: [
|
|
603
|
+
{
|
|
604
|
+
name: "",
|
|
554
605
|
type: "bytes32",
|
|
555
606
|
internalType: "bytes32"
|
|
556
607
|
}
|
|
557
|
-
]
|
|
558
|
-
|
|
559
|
-
{
|
|
560
|
-
type: "error",
|
|
561
|
-
name: "ExchangeRateInvalid",
|
|
562
|
-
inputs: []
|
|
608
|
+
],
|
|
609
|
+
stateMutability: "view"
|
|
563
610
|
},
|
|
564
611
|
{
|
|
565
|
-
type: "
|
|
566
|
-
name: "
|
|
567
|
-
inputs: [
|
|
612
|
+
type: "function",
|
|
613
|
+
name: "owner",
|
|
614
|
+
inputs: [],
|
|
615
|
+
outputs: [
|
|
568
616
|
{
|
|
569
|
-
name: "
|
|
617
|
+
name: "",
|
|
570
618
|
type: "address",
|
|
571
619
|
internalType: "address"
|
|
572
620
|
}
|
|
573
|
-
]
|
|
621
|
+
],
|
|
622
|
+
stateMutability: "view"
|
|
574
623
|
},
|
|
575
624
|
{
|
|
576
|
-
type: "
|
|
577
|
-
name: "
|
|
625
|
+
type: "function",
|
|
626
|
+
name: "postOp",
|
|
578
627
|
inputs: [
|
|
579
628
|
{
|
|
580
|
-
name: "
|
|
581
|
-
type: "
|
|
582
|
-
internalType: "
|
|
583
|
-
}
|
|
584
|
-
]
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
type: "error",
|
|
588
|
-
name: "PaymasterAndDataLengthInvalid",
|
|
589
|
-
inputs: []
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
type: "error",
|
|
593
|
-
name: "PaymasterConfigLengthInvalid",
|
|
594
|
-
inputs: []
|
|
595
|
-
},
|
|
596
|
-
{
|
|
597
|
-
type: "error",
|
|
598
|
-
name: "PaymasterModeInvalid",
|
|
599
|
-
inputs: []
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
type: "error",
|
|
603
|
-
name: "PaymasterSignatureLengthInvalid",
|
|
604
|
-
inputs: []
|
|
605
|
-
},
|
|
606
|
-
{
|
|
607
|
-
type: "error",
|
|
608
|
-
name: "PostOpTransferFromFailed",
|
|
609
|
-
inputs: [
|
|
629
|
+
name: "mode",
|
|
630
|
+
type: "uint8",
|
|
631
|
+
internalType: "enum PostOpMode"
|
|
632
|
+
},
|
|
610
633
|
{
|
|
611
|
-
name: "
|
|
612
|
-
type: "
|
|
613
|
-
internalType: "
|
|
614
|
-
}
|
|
615
|
-
]
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
type: "error",
|
|
619
|
-
name: "TokenAddressInvalid",
|
|
620
|
-
inputs: []
|
|
621
|
-
}
|
|
622
|
-
] as const
|
|
623
|
-
|
|
624
|
-
export const SINGLETON_PAYMASTER_V06_ABI = [
|
|
625
|
-
{
|
|
626
|
-
inputs: [
|
|
627
|
-
{ internalType: "address", name: "_entryPoint", type: "address" },
|
|
628
|
-
{ internalType: "address", name: "_owner", type: "address" },
|
|
629
|
-
{ internalType: "address[]", name: "_signers", type: "address[]" }
|
|
630
|
-
],
|
|
631
|
-
stateMutability: "nonpayable",
|
|
632
|
-
type: "constructor"
|
|
633
|
-
},
|
|
634
|
-
{ inputs: [], name: "ECDSAInvalidSignature", type: "error" },
|
|
635
|
-
{
|
|
636
|
-
inputs: [{ internalType: "uint256", name: "length", type: "uint256" }],
|
|
637
|
-
name: "ECDSAInvalidSignatureLength",
|
|
638
|
-
type: "error"
|
|
639
|
-
},
|
|
640
|
-
{
|
|
641
|
-
inputs: [{ internalType: "bytes32", name: "s", type: "bytes32" }],
|
|
642
|
-
name: "ECDSAInvalidSignatureS",
|
|
643
|
-
type: "error"
|
|
644
|
-
},
|
|
645
|
-
{ inputs: [], name: "ExchangeRateInvalid", type: "error" },
|
|
646
|
-
{
|
|
647
|
-
inputs: [{ internalType: "address", name: "owner", type: "address" }],
|
|
648
|
-
name: "OwnableInvalidOwner",
|
|
649
|
-
type: "error"
|
|
650
|
-
},
|
|
651
|
-
{
|
|
652
|
-
inputs: [{ internalType: "address", name: "account", type: "address" }],
|
|
653
|
-
name: "OwnableUnauthorizedAccount",
|
|
654
|
-
type: "error"
|
|
655
|
-
},
|
|
656
|
-
{ inputs: [], name: "PaymasterAndDataLengthInvalid", type: "error" },
|
|
657
|
-
{ inputs: [], name: "PaymasterConfigLengthInvalid", type: "error" },
|
|
658
|
-
{ inputs: [], name: "PaymasterModeInvalid", type: "error" },
|
|
659
|
-
{ inputs: [], name: "PaymasterSignatureLengthInvalid", type: "error" },
|
|
660
|
-
{
|
|
661
|
-
inputs: [{ internalType: "string", name: "msg", type: "string" }],
|
|
662
|
-
name: "PostOpTransferFromFailed",
|
|
663
|
-
type: "error"
|
|
664
|
-
},
|
|
665
|
-
{ inputs: [], name: "TokenAddressInvalid", type: "error" },
|
|
666
|
-
{
|
|
667
|
-
anonymous: false,
|
|
668
|
-
inputs: [
|
|
634
|
+
name: "context",
|
|
635
|
+
type: "bytes",
|
|
636
|
+
internalType: "bytes"
|
|
637
|
+
},
|
|
669
638
|
{
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
type: "address"
|
|
639
|
+
name: "actualGasCost",
|
|
640
|
+
type: "uint256",
|
|
641
|
+
internalType: "uint256"
|
|
674
642
|
},
|
|
675
643
|
{
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
type: "address"
|
|
644
|
+
name: "actualUserOpFeePerGas",
|
|
645
|
+
type: "uint256",
|
|
646
|
+
internalType: "uint256"
|
|
680
647
|
}
|
|
681
648
|
],
|
|
682
|
-
|
|
683
|
-
|
|
649
|
+
outputs: [],
|
|
650
|
+
stateMutability: "nonpayable"
|
|
684
651
|
},
|
|
685
652
|
{
|
|
686
|
-
|
|
653
|
+
type: "function",
|
|
654
|
+
name: "removeSigner",
|
|
687
655
|
inputs: [
|
|
688
656
|
{
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
type: "address"
|
|
657
|
+
name: "_signer",
|
|
658
|
+
type: "address",
|
|
659
|
+
internalType: "address"
|
|
693
660
|
}
|
|
694
661
|
],
|
|
695
|
-
|
|
696
|
-
|
|
662
|
+
outputs: [],
|
|
663
|
+
stateMutability: "nonpayable"
|
|
697
664
|
},
|
|
698
665
|
{
|
|
699
|
-
|
|
666
|
+
type: "function",
|
|
667
|
+
name: "renounceOwnership",
|
|
668
|
+
inputs: [],
|
|
669
|
+
outputs: [],
|
|
670
|
+
stateMutability: "nonpayable"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
type: "function",
|
|
674
|
+
name: "setTreasury",
|
|
700
675
|
inputs: [
|
|
701
676
|
{
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
type: "address"
|
|
677
|
+
name: "_treasury",
|
|
678
|
+
type: "address",
|
|
679
|
+
internalType: "address"
|
|
706
680
|
}
|
|
707
681
|
],
|
|
708
|
-
|
|
709
|
-
|
|
682
|
+
outputs: [],
|
|
683
|
+
stateMutability: "nonpayable"
|
|
710
684
|
},
|
|
711
685
|
{
|
|
712
|
-
|
|
686
|
+
type: "function",
|
|
687
|
+
name: "signers",
|
|
713
688
|
inputs: [
|
|
714
689
|
{
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
690
|
+
name: "account",
|
|
691
|
+
type: "address",
|
|
692
|
+
internalType: "address"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
outputs: [
|
|
720
696
|
{
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
type: "address"
|
|
697
|
+
name: "isValidSigner",
|
|
698
|
+
type: "bool",
|
|
699
|
+
internalType: "bool"
|
|
725
700
|
}
|
|
726
701
|
],
|
|
727
|
-
|
|
728
|
-
type: "event"
|
|
702
|
+
stateMutability: "view"
|
|
729
703
|
},
|
|
730
704
|
{
|
|
731
|
-
|
|
705
|
+
type: "function",
|
|
706
|
+
name: "transferOwnership",
|
|
732
707
|
inputs: [
|
|
733
708
|
{
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
type: "bytes32"
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
indexed: true,
|
|
741
|
-
internalType: "address",
|
|
742
|
-
name: "user",
|
|
743
|
-
type: "address"
|
|
744
|
-
},
|
|
745
|
-
{
|
|
746
|
-
indexed: false,
|
|
747
|
-
internalType: "uint8",
|
|
748
|
-
name: "paymasterMode",
|
|
749
|
-
type: "uint8"
|
|
750
|
-
},
|
|
751
|
-
{
|
|
752
|
-
indexed: false,
|
|
753
|
-
internalType: "address",
|
|
754
|
-
name: "token",
|
|
755
|
-
type: "address"
|
|
756
|
-
},
|
|
757
|
-
{
|
|
758
|
-
indexed: false,
|
|
759
|
-
internalType: "uint256",
|
|
760
|
-
name: "tokenAmountPaid",
|
|
761
|
-
type: "uint256"
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
indexed: false,
|
|
765
|
-
internalType: "uint256",
|
|
766
|
-
name: "exchangeRate",
|
|
767
|
-
type: "uint256"
|
|
709
|
+
name: "newOwner",
|
|
710
|
+
type: "address",
|
|
711
|
+
internalType: "address"
|
|
768
712
|
}
|
|
769
713
|
],
|
|
770
|
-
name: "UserOperationSponsored",
|
|
771
|
-
type: "event"
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
inputs: [{ internalType: "address", name: "_signer", type: "address" }],
|
|
775
|
-
name: "addSigner",
|
|
776
714
|
outputs: [],
|
|
777
|
-
stateMutability: "nonpayable"
|
|
778
|
-
type: "function"
|
|
715
|
+
stateMutability: "nonpayable"
|
|
779
716
|
},
|
|
780
717
|
{
|
|
781
|
-
|
|
782
|
-
|
|
718
|
+
type: "function",
|
|
719
|
+
name: "treasury",
|
|
720
|
+
inputs: [],
|
|
721
|
+
outputs: [
|
|
722
|
+
{
|
|
723
|
+
name: "",
|
|
724
|
+
type: "address",
|
|
725
|
+
internalType: "address"
|
|
726
|
+
}
|
|
783
727
|
],
|
|
784
|
-
|
|
785
|
-
outputs: [],
|
|
786
|
-
stateMutability: "payable",
|
|
787
|
-
type: "function"
|
|
728
|
+
stateMutability: "view"
|
|
788
729
|
},
|
|
789
730
|
{
|
|
731
|
+
type: "function",
|
|
732
|
+
name: "unlockStake",
|
|
790
733
|
inputs: [],
|
|
791
|
-
name: "deposit",
|
|
792
734
|
outputs: [],
|
|
793
|
-
stateMutability: "
|
|
794
|
-
type: "function"
|
|
795
|
-
},
|
|
796
|
-
{
|
|
797
|
-
inputs: [],
|
|
798
|
-
name: "entryPoint",
|
|
799
|
-
outputs: [
|
|
800
|
-
{ internalType: "contract IEntryPoint", name: "", type: "address" }
|
|
801
|
-
],
|
|
802
|
-
stateMutability: "view",
|
|
803
|
-
type: "function"
|
|
735
|
+
stateMutability: "nonpayable"
|
|
804
736
|
},
|
|
805
737
|
{
|
|
738
|
+
type: "function",
|
|
739
|
+
name: "validatePaymasterUserOp",
|
|
806
740
|
inputs: [
|
|
807
741
|
{
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
},
|
|
812
|
-
{ internalType: "uint256", name: "_postOpGas", type: "uint256" },
|
|
813
|
-
{
|
|
814
|
-
internalType: "uint256",
|
|
815
|
-
name: "_actualUserOpFeePerGas",
|
|
816
|
-
type: "uint256"
|
|
817
|
-
},
|
|
818
|
-
{ internalType: "uint256", name: "_exchangeRate", type: "uint256" }
|
|
819
|
-
],
|
|
820
|
-
name: "getCostInToken",
|
|
821
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
822
|
-
stateMutability: "pure",
|
|
823
|
-
type: "function"
|
|
824
|
-
},
|
|
825
|
-
{
|
|
826
|
-
inputs: [],
|
|
827
|
-
name: "getDeposit",
|
|
828
|
-
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
829
|
-
stateMutability: "view",
|
|
830
|
-
type: "function"
|
|
831
|
-
},
|
|
832
|
-
{
|
|
833
|
-
inputs: [
|
|
834
|
-
{ internalType: "uint8", name: "_mode", type: "uint8" },
|
|
835
|
-
{
|
|
742
|
+
name: "userOp",
|
|
743
|
+
type: "tuple",
|
|
744
|
+
internalType: "struct PackedUserOperation",
|
|
836
745
|
components: [
|
|
837
746
|
{
|
|
838
|
-
internalType: "address",
|
|
839
747
|
name: "sender",
|
|
840
|
-
type: "address"
|
|
748
|
+
type: "address",
|
|
749
|
+
internalType: "address"
|
|
841
750
|
},
|
|
842
|
-
{ internalType: "uint256", name: "nonce", type: "uint256" },
|
|
843
|
-
{ internalType: "bytes", name: "initCode", type: "bytes" },
|
|
844
|
-
{ internalType: "bytes", name: "callData", type: "bytes" },
|
|
845
751
|
{
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
752
|
+
name: "nonce",
|
|
753
|
+
type: "uint256",
|
|
754
|
+
internalType: "uint256"
|
|
849
755
|
},
|
|
850
756
|
{
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
757
|
+
name: "initCode",
|
|
758
|
+
type: "bytes",
|
|
759
|
+
internalType: "bytes"
|
|
854
760
|
},
|
|
855
761
|
{
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
762
|
+
name: "callData",
|
|
763
|
+
type: "bytes",
|
|
764
|
+
internalType: "bytes"
|
|
859
765
|
},
|
|
860
766
|
{
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
767
|
+
name: "accountGasLimits",
|
|
768
|
+
type: "bytes32",
|
|
769
|
+
internalType: "bytes32"
|
|
864
770
|
},
|
|
865
771
|
{
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
772
|
+
name: "preVerificationGas",
|
|
773
|
+
type: "uint256",
|
|
774
|
+
internalType: "uint256"
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
name: "gasFees",
|
|
778
|
+
type: "bytes32",
|
|
779
|
+
internalType: "bytes32"
|
|
869
780
|
},
|
|
870
781
|
{
|
|
871
|
-
internalType: "bytes",
|
|
872
782
|
name: "paymasterAndData",
|
|
873
|
-
type: "bytes"
|
|
783
|
+
type: "bytes",
|
|
784
|
+
internalType: "bytes"
|
|
874
785
|
},
|
|
875
|
-
{
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
786
|
+
{
|
|
787
|
+
name: "signature",
|
|
788
|
+
type: "bytes",
|
|
789
|
+
internalType: "bytes"
|
|
790
|
+
}
|
|
791
|
+
]
|
|
792
|
+
},
|
|
793
|
+
{
|
|
794
|
+
name: "userOpHash",
|
|
795
|
+
type: "bytes32",
|
|
796
|
+
internalType: "bytes32"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
name: "maxCost",
|
|
800
|
+
type: "uint256",
|
|
801
|
+
internalType: "uint256"
|
|
880
802
|
}
|
|
881
803
|
],
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
804
|
+
outputs: [
|
|
805
|
+
{
|
|
806
|
+
name: "context",
|
|
807
|
+
type: "bytes",
|
|
808
|
+
internalType: "bytes"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
name: "validationData",
|
|
812
|
+
type: "uint256",
|
|
813
|
+
internalType: "uint256"
|
|
814
|
+
}
|
|
815
|
+
],
|
|
816
|
+
stateMutability: "nonpayable"
|
|
886
817
|
},
|
|
887
818
|
{
|
|
888
|
-
|
|
889
|
-
name: "
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
819
|
+
type: "function",
|
|
820
|
+
name: "withdrawStake",
|
|
821
|
+
inputs: [
|
|
822
|
+
{
|
|
823
|
+
name: "withdrawAddress",
|
|
824
|
+
type: "address",
|
|
825
|
+
internalType: "address payable"
|
|
826
|
+
}
|
|
827
|
+
],
|
|
828
|
+
outputs: [],
|
|
829
|
+
stateMutability: "nonpayable"
|
|
893
830
|
},
|
|
894
831
|
{
|
|
832
|
+
type: "function",
|
|
833
|
+
name: "withdrawTo",
|
|
895
834
|
inputs: [
|
|
896
|
-
{
|
|
897
|
-
|
|
898
|
-
|
|
835
|
+
{
|
|
836
|
+
name: "withdrawAddress",
|
|
837
|
+
type: "address",
|
|
838
|
+
internalType: "address payable"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: "amount",
|
|
842
|
+
type: "uint256",
|
|
843
|
+
internalType: "uint256"
|
|
844
|
+
}
|
|
899
845
|
],
|
|
900
|
-
name: "postOp",
|
|
901
846
|
outputs: [],
|
|
902
|
-
stateMutability: "nonpayable"
|
|
903
|
-
type: "function"
|
|
847
|
+
stateMutability: "nonpayable"
|
|
904
848
|
},
|
|
905
849
|
{
|
|
906
|
-
|
|
907
|
-
name: "
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
850
|
+
type: "event",
|
|
851
|
+
name: "OwnershipTransferred",
|
|
852
|
+
inputs: [
|
|
853
|
+
{
|
|
854
|
+
name: "previousOwner",
|
|
855
|
+
type: "address",
|
|
856
|
+
indexed: true,
|
|
857
|
+
internalType: "address"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
name: "newOwner",
|
|
861
|
+
type: "address",
|
|
862
|
+
indexed: true,
|
|
863
|
+
internalType: "address"
|
|
864
|
+
}
|
|
865
|
+
],
|
|
866
|
+
anonymous: false
|
|
911
867
|
},
|
|
912
868
|
{
|
|
913
|
-
|
|
914
|
-
name: "
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
869
|
+
type: "event",
|
|
870
|
+
name: "SignerAdded",
|
|
871
|
+
inputs: [
|
|
872
|
+
{
|
|
873
|
+
name: "signer",
|
|
874
|
+
type: "address",
|
|
875
|
+
indexed: false,
|
|
876
|
+
internalType: "address"
|
|
877
|
+
}
|
|
878
|
+
],
|
|
879
|
+
anonymous: false
|
|
918
880
|
},
|
|
919
881
|
{
|
|
882
|
+
type: "event",
|
|
883
|
+
name: "SignerRemoved",
|
|
920
884
|
inputs: [
|
|
921
|
-
{
|
|
885
|
+
{
|
|
886
|
+
name: "signer",
|
|
887
|
+
type: "address",
|
|
888
|
+
indexed: false,
|
|
889
|
+
internalType: "address"
|
|
890
|
+
}
|
|
922
891
|
],
|
|
923
|
-
|
|
924
|
-
outputs: [],
|
|
925
|
-
stateMutability: "nonpayable",
|
|
926
|
-
type: "function"
|
|
892
|
+
anonymous: false
|
|
927
893
|
},
|
|
928
894
|
{
|
|
929
|
-
|
|
930
|
-
name: "
|
|
931
|
-
|
|
932
|
-
{
|
|
895
|
+
type: "event",
|
|
896
|
+
name: "TreasuryUpdated",
|
|
897
|
+
inputs: [
|
|
898
|
+
{
|
|
899
|
+
name: "oldTreasury",
|
|
900
|
+
type: "address",
|
|
901
|
+
indexed: false,
|
|
902
|
+
internalType: "address"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: "newTreasury",
|
|
906
|
+
type: "address",
|
|
907
|
+
indexed: false,
|
|
908
|
+
internalType: "address"
|
|
909
|
+
}
|
|
933
910
|
],
|
|
934
|
-
|
|
935
|
-
type: "function"
|
|
911
|
+
anonymous: false
|
|
936
912
|
},
|
|
937
913
|
{
|
|
914
|
+
type: "event",
|
|
915
|
+
name: "UserOperationSponsored",
|
|
938
916
|
inputs: [
|
|
939
|
-
{
|
|
917
|
+
{
|
|
918
|
+
name: "userOpHash",
|
|
919
|
+
type: "bytes32",
|
|
920
|
+
indexed: true,
|
|
921
|
+
internalType: "bytes32"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
name: "user",
|
|
925
|
+
type: "address",
|
|
926
|
+
indexed: true,
|
|
927
|
+
internalType: "address"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
name: "paymasterMode",
|
|
931
|
+
type: "uint8",
|
|
932
|
+
indexed: false,
|
|
933
|
+
internalType: "uint8"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
name: "token",
|
|
937
|
+
type: "address",
|
|
938
|
+
indexed: false,
|
|
939
|
+
internalType: "address"
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: "tokenAmountPaid",
|
|
943
|
+
type: "uint256",
|
|
944
|
+
indexed: false,
|
|
945
|
+
internalType: "uint256"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: "exchangeRate",
|
|
949
|
+
type: "uint256",
|
|
950
|
+
indexed: false,
|
|
951
|
+
internalType: "uint256"
|
|
952
|
+
}
|
|
940
953
|
],
|
|
941
|
-
|
|
942
|
-
outputs: [],
|
|
943
|
-
stateMutability: "nonpayable",
|
|
944
|
-
type: "function"
|
|
954
|
+
anonymous: false
|
|
945
955
|
},
|
|
946
956
|
{
|
|
947
|
-
|
|
948
|
-
name: "
|
|
949
|
-
|
|
950
|
-
stateMutability: "view",
|
|
951
|
-
type: "function"
|
|
957
|
+
type: "error",
|
|
958
|
+
name: "ECDSAInvalidSignature",
|
|
959
|
+
inputs: []
|
|
952
960
|
},
|
|
953
961
|
{
|
|
954
|
-
|
|
955
|
-
name: "
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
962
|
+
type: "error",
|
|
963
|
+
name: "ECDSAInvalidSignatureLength",
|
|
964
|
+
inputs: [
|
|
965
|
+
{
|
|
966
|
+
name: "length",
|
|
967
|
+
type: "uint256",
|
|
968
|
+
internalType: "uint256"
|
|
969
|
+
}
|
|
970
|
+
]
|
|
959
971
|
},
|
|
960
972
|
{
|
|
973
|
+
type: "error",
|
|
974
|
+
name: "ECDSAInvalidSignatureS",
|
|
961
975
|
inputs: [
|
|
962
976
|
{
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
},
|
|
969
|
-
{ internalType: "uint256", name: "nonce", type: "uint256" },
|
|
970
|
-
{ internalType: "bytes", name: "initCode", type: "bytes" },
|
|
971
|
-
{ internalType: "bytes", name: "callData", type: "bytes" },
|
|
972
|
-
{
|
|
973
|
-
internalType: "uint256",
|
|
974
|
-
name: "callGasLimit",
|
|
975
|
-
type: "uint256"
|
|
976
|
-
},
|
|
977
|
-
{
|
|
978
|
-
internalType: "uint256",
|
|
979
|
-
name: "verificationGasLimit",
|
|
980
|
-
type: "uint256"
|
|
981
|
-
},
|
|
982
|
-
{
|
|
983
|
-
internalType: "uint256",
|
|
984
|
-
name: "preVerificationGas",
|
|
985
|
-
type: "uint256"
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
internalType: "uint256",
|
|
989
|
-
name: "maxFeePerGas",
|
|
990
|
-
type: "uint256"
|
|
991
|
-
},
|
|
992
|
-
{
|
|
993
|
-
internalType: "uint256",
|
|
994
|
-
name: "maxPriorityFeePerGas",
|
|
995
|
-
type: "uint256"
|
|
996
|
-
},
|
|
997
|
-
{
|
|
998
|
-
internalType: "bytes",
|
|
999
|
-
name: "paymasterAndData",
|
|
1000
|
-
type: "bytes"
|
|
1001
|
-
},
|
|
1002
|
-
{ internalType: "bytes", name: "signature", type: "bytes" }
|
|
1003
|
-
],
|
|
1004
|
-
internalType: "struct UserOperation",
|
|
1005
|
-
name: "userOp",
|
|
1006
|
-
type: "tuple"
|
|
1007
|
-
},
|
|
1008
|
-
{ internalType: "bytes32", name: "userOpHash", type: "bytes32" },
|
|
1009
|
-
{ internalType: "uint256", name: "maxCost", type: "uint256" }
|
|
1010
|
-
],
|
|
1011
|
-
name: "validatePaymasterUserOp",
|
|
1012
|
-
outputs: [
|
|
1013
|
-
{ internalType: "bytes", name: "context", type: "bytes" },
|
|
1014
|
-
{ internalType: "uint256", name: "validationData", type: "uint256" }
|
|
1015
|
-
],
|
|
1016
|
-
stateMutability: "nonpayable",
|
|
1017
|
-
type: "function"
|
|
977
|
+
name: "s",
|
|
978
|
+
type: "bytes32",
|
|
979
|
+
internalType: "bytes32"
|
|
980
|
+
}
|
|
981
|
+
]
|
|
1018
982
|
},
|
|
1019
983
|
{
|
|
984
|
+
type: "error",
|
|
985
|
+
name: "ExchangeRateInvalid",
|
|
986
|
+
inputs: []
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
type: "error",
|
|
990
|
+
name: "OwnableInvalidOwner",
|
|
1020
991
|
inputs: [
|
|
1021
992
|
{
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
993
|
+
name: "owner",
|
|
994
|
+
type: "address",
|
|
995
|
+
internalType: "address"
|
|
1025
996
|
}
|
|
1026
|
-
]
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
997
|
+
]
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
type: "error",
|
|
1001
|
+
name: "OwnableUnauthorizedAccount",
|
|
1002
|
+
inputs: [
|
|
1003
|
+
{
|
|
1004
|
+
name: "account",
|
|
1005
|
+
type: "address",
|
|
1006
|
+
internalType: "address"
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
1031
1009
|
},
|
|
1032
1010
|
{
|
|
1011
|
+
type: "error",
|
|
1012
|
+
name: "PaymasterAndDataLengthInvalid",
|
|
1013
|
+
inputs: []
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
type: "error",
|
|
1017
|
+
name: "PaymasterConfigLengthInvalid",
|
|
1018
|
+
inputs: []
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
type: "error",
|
|
1022
|
+
name: "PaymasterModeInvalid",
|
|
1023
|
+
inputs: []
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
type: "error",
|
|
1027
|
+
name: "PaymasterSignatureLengthInvalid",
|
|
1028
|
+
inputs: []
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
type: "error",
|
|
1032
|
+
name: "PostOpTransferFromFailed",
|
|
1033
1033
|
inputs: [
|
|
1034
1034
|
{
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1035
|
+
name: "msg",
|
|
1036
|
+
type: "string",
|
|
1037
|
+
internalType: "string"
|
|
1038
|
+
}
|
|
1039
|
+
]
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
type: "error",
|
|
1043
|
+
name: "TokenAddressInvalid",
|
|
1044
|
+
inputs: []
|
|
1045
1045
|
}
|
|
1046
1046
|
] as const
|
|
1047
|
+
|
|
1048
|
+
export const singletonPaymaster08Abi = singletonPaymaster07Abi
|