viem 2.27.1 → 2.27.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 +9 -1
- package/_cjs/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.js.map +1 -1
- package/_cjs/account-abstraction/accounts/implementations/toSoladySmartAccount.js.map +1 -1
- package/_cjs/account-abstraction/accounts/toSmartAccount.js +2 -2
- package/_cjs/account-abstraction/accounts/toSmartAccount.js.map +1 -1
- package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js +1 -7
- package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_cjs/account-abstraction/actions/bundler/prepareUserOperation.js +1 -21
- package/_cjs/account-abstraction/actions/bundler/prepareUserOperation.js.map +1 -1
- package/_cjs/account-abstraction/actions/bundler/sendUserOperation.js +2 -2
- package/_cjs/account-abstraction/actions/bundler/sendUserOperation.js.map +1 -1
- package/_cjs/account-abstraction/actions/paymaster/getPaymasterData.js.map +1 -1
- package/_cjs/account-abstraction/constants/abis.js +1 -691
- package/_cjs/account-abstraction/constants/abis.js.map +1 -1
- package/_cjs/account-abstraction/constants/address.js +1 -2
- package/_cjs/account-abstraction/constants/address.js.map +1 -1
- package/_cjs/account-abstraction/index.js +2 -6
- package/_cjs/account-abstraction/index.js.map +1 -1
- package/_cjs/account-abstraction/utils/formatters/userOperationRequest.js +0 -19
- package/_cjs/account-abstraction/utils/formatters/userOperationRequest.js.map +1 -1
- package/_cjs/account-abstraction/utils/userOperation/getUserOperationHash.js +0 -70
- package/_cjs/account-abstraction/utils/userOperation/getUserOperationHash.js.map +1 -1
- package/_cjs/chains/definitions/gunz.js +29 -0
- package/_cjs/chains/definitions/gunz.js.map +1 -0
- package/_cjs/chains/index.js +10 -8
- package/_cjs/chains/index.js.map +1 -1
- package/_cjs/constants/address.js +1 -2
- package/_cjs/constants/address.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_esm/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.js.map +1 -1
- package/_esm/account-abstraction/accounts/implementations/toSoladySmartAccount.js.map +1 -1
- package/_esm/account-abstraction/accounts/toSmartAccount.js +2 -2
- package/_esm/account-abstraction/accounts/toSmartAccount.js.map +1 -1
- package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js +1 -7
- package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
- package/_esm/account-abstraction/actions/bundler/prepareUserOperation.js +1 -21
- package/_esm/account-abstraction/actions/bundler/prepareUserOperation.js.map +1 -1
- package/_esm/account-abstraction/actions/bundler/sendUserOperation.js +2 -2
- package/_esm/account-abstraction/actions/bundler/sendUserOperation.js.map +1 -1
- package/_esm/account-abstraction/actions/paymaster/getPaymasterData.js.map +1 -1
- package/_esm/account-abstraction/constants/abis.js +0 -690
- package/_esm/account-abstraction/constants/abis.js.map +1 -1
- package/_esm/account-abstraction/constants/address.js +0 -1
- package/_esm/account-abstraction/constants/address.js.map +1 -1
- package/_esm/account-abstraction/index.js +2 -3
- package/_esm/account-abstraction/index.js.map +1 -1
- package/_esm/account-abstraction/utils/formatters/userOperationRequest.js +0 -19
- package/_esm/account-abstraction/utils/formatters/userOperationRequest.js.map +1 -1
- package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js +0 -70
- package/_esm/account-abstraction/utils/userOperation/getUserOperationHash.js.map +1 -1
- package/_esm/chains/definitions/gunz.js +26 -0
- package/_esm/chains/definitions/gunz.js.map +1 -0
- package/_esm/chains/index.js +1 -0
- package/_esm/chains/index.js.map +1 -1
- package/_esm/constants/address.js +0 -1
- package/_esm/constants/address.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_types/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.d.ts +2 -1
- package/_types/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.d.ts.map +1 -1
- package/_types/account-abstraction/accounts/implementations/toSoladySmartAccount.d.ts +2 -1
- package/_types/account-abstraction/accounts/implementations/toSoladySmartAccount.d.ts.map +1 -1
- package/_types/account-abstraction/accounts/types.d.ts +3 -16
- package/_types/account-abstraction/accounts/types.d.ts.map +1 -1
- package/_types/account-abstraction/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
- package/_types/account-abstraction/actions/bundler/prepareUserOperation.d.ts +6 -23
- package/_types/account-abstraction/actions/bundler/prepareUserOperation.d.ts.map +1 -1
- package/_types/account-abstraction/actions/paymaster/getPaymasterData.d.ts +1 -1
- package/_types/account-abstraction/actions/paymaster/getPaymasterData.d.ts.map +1 -1
- package/_types/account-abstraction/constants/abis.d.ts +0 -830
- package/_types/account-abstraction/constants/abis.d.ts.map +1 -1
- package/_types/account-abstraction/constants/address.d.ts +0 -1
- package/_types/account-abstraction/constants/address.d.ts.map +1 -1
- package/_types/account-abstraction/index.d.ts +2 -3
- package/_types/account-abstraction/index.d.ts.map +1 -1
- package/_types/account-abstraction/types/entryPointVersion.d.ts +1 -1
- package/_types/account-abstraction/types/entryPointVersion.d.ts.map +1 -1
- package/_types/account-abstraction/types/rpc.d.ts +3 -6
- package/_types/account-abstraction/types/rpc.d.ts.map +1 -1
- package/_types/account-abstraction/types/userOperation.d.ts +5 -49
- package/_types/account-abstraction/types/userOperation.d.ts.map +1 -1
- package/_types/account-abstraction/utils/formatters/userOperationRequest.d.ts.map +1 -1
- package/_types/account-abstraction/utils/userOperation/getUserOperationHash.d.ts.map +1 -1
- package/_types/celo/chainConfig.d.ts +14 -14
- package/_types/celo/formatters.d.ts +7 -7
- package/_types/chains/definitions/abstract.d.ts +3 -3
- package/_types/chains/definitions/abstractTestnet.d.ts +3 -3
- package/_types/chains/definitions/celo.d.ts +14 -14
- package/_types/chains/definitions/celoAlfajores.d.ts +14 -14
- package/_types/chains/definitions/gunz.d.ts +34 -0
- package/_types/chains/definitions/gunz.d.ts.map +1 -0
- package/_types/chains/definitions/playfiAlbireo.d.ts +3 -3
- package/_types/chains/definitions/sophon.d.ts +3 -3
- package/_types/chains/definitions/sophonTestnet.d.ts +3 -3
- package/_types/chains/definitions/treasure.d.ts +3 -3
- package/_types/chains/definitions/treasureTopaz.d.ts +3 -3
- package/_types/chains/definitions/zksync.d.ts +3 -3
- package/_types/chains/definitions/zksyncInMemoryNode.d.ts +3 -3
- package/_types/chains/definitions/zksyncLocalCustomHyperchain.d.ts +3 -3
- package/_types/chains/definitions/zksyncLocalHyperchain.d.ts +3 -3
- package/_types/chains/definitions/zksyncLocalNode.d.ts +3 -3
- package/_types/chains/definitions/zksyncSepoliaTestnet.d.ts +3 -3
- package/_types/chains/index.d.ts +1 -0
- package/_types/chains/index.d.ts.map +1 -1
- package/_types/constants/address.d.ts +0 -1
- package/_types/constants/address.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/types/authorization.d.ts +1 -1
- package/_types/types/authorization.d.ts.map +1 -1
- package/_types/types/misc.d.ts +7 -7
- package/_types/types/misc.d.ts.map +1 -1
- package/_types/utils/formatters/transaction.d.ts +1 -1
- package/_types/utils/formatters/transactionRequest.d.ts +1 -1
- package/_types/zksync/chainConfig.d.ts +3 -3
- package/_types/zksync/formatters.d.ts +3 -3
- package/account-abstraction/accounts/implementations/toCoinbaseSmartAccount.ts +2 -1
- package/account-abstraction/accounts/implementations/toSoladySmartAccount.ts +2 -1
- package/account-abstraction/accounts/toSmartAccount.ts +2 -2
- package/account-abstraction/accounts/types.ts +2 -26
- package/account-abstraction/actions/bundler/estimateUserOperationGas.ts +1 -8
- package/account-abstraction/actions/bundler/prepareUserOperation.ts +2 -56
- package/account-abstraction/actions/bundler/sendUserOperation.ts +2 -2
- package/account-abstraction/actions/paymaster/getPaymasterData.ts +0 -24
- package/account-abstraction/constants/abis.ts +0 -691
- package/account-abstraction/constants/address.ts +0 -2
- package/account-abstraction/index.ts +1 -12
- package/account-abstraction/types/entryPointVersion.ts +1 -1
- package/account-abstraction/types/rpc.ts +3 -6
- package/account-abstraction/types/userOperation.ts +3 -69
- package/account-abstraction/utils/formatters/userOperationRequest.ts +0 -21
- package/account-abstraction/utils/userOperation/getUserOperationHash.ts +0 -79
- package/chains/definitions/gunz.ts +26 -0
- package/chains/index.ts +1 -0
- package/constants/address.ts +0 -2
- package/errors/version.ts +1 -1
- package/package.json +3 -3
- package/types/authorization.ts +1 -1
- package/types/misc.ts +7 -7
- package/_cjs/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js +0 -313
- package/_cjs/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js.map +0 -1
- package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js +0 -327
- package/_esm/account-abstraction/accounts/implementations/toSimple7702SmartAccount.js.map +0 -1
- package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts +0 -311
- package/_types/account-abstraction/accounts/implementations/toSimple7702SmartAccount.d.ts.map +0 -1
- package/account-abstraction/accounts/implementations/toSimple7702SmartAccount.ts +0 -382
@@ -1,382 +0,0 @@
|
|
1
|
-
import type { Address, TypedData } from 'abitype'
|
2
|
-
|
3
|
-
import type { PrivateKeyAccount } from '../../../accounts/types.js'
|
4
|
-
import { entryPoint08Address } from '../../../constants/address.js'
|
5
|
-
import { BaseError } from '../../../errors/base.js'
|
6
|
-
import type { TypedDataDefinition } from '../../../types/typedData.js'
|
7
|
-
import type { Prettify } from '../../../types/utils.js'
|
8
|
-
import { decodeFunctionData } from '../../../utils/abi/decodeFunctionData.js'
|
9
|
-
import { encodeFunctionData } from '../../../utils/abi/encodeFunctionData.js'
|
10
|
-
import { concat, encodePacked, numberToHex, pad } from '../../../utils/index.js'
|
11
|
-
import { entryPoint08Abi } from '../../constants/abis.js'
|
12
|
-
import { toSmartAccount } from '../toSmartAccount.js'
|
13
|
-
import type { SmartAccount, SmartAccountImplementation } from '../types.js'
|
14
|
-
|
15
|
-
export type ToSimple7702SmartAccountParameters = {
|
16
|
-
client: Simple7702SmartAccountImplementation['client']
|
17
|
-
implementation?: Address | undefined
|
18
|
-
getNonce?: SmartAccountImplementation['getNonce'] | undefined
|
19
|
-
owner: PrivateKeyAccount
|
20
|
-
}
|
21
|
-
|
22
|
-
export type ToSimple7702SmartAccountReturnType = Prettify<
|
23
|
-
SmartAccount<Simple7702SmartAccountImplementation>
|
24
|
-
>
|
25
|
-
|
26
|
-
export type Simple7702SmartAccountImplementation = SmartAccountImplementation<
|
27
|
-
typeof entryPoint08Abi,
|
28
|
-
'0.8',
|
29
|
-
{ abi: typeof abi; owner: PrivateKeyAccount },
|
30
|
-
true
|
31
|
-
>
|
32
|
-
|
33
|
-
/**
|
34
|
-
* @description Create a Simple7702 Smart Account.
|
35
|
-
*
|
36
|
-
* @param parameters - {@link ToSimple7702SmartAccountParameters}
|
37
|
-
* @returns Simple7702 Smart Account. {@link ToSimple7702SmartAccountReturnType}
|
38
|
-
*
|
39
|
-
* @example
|
40
|
-
* import { toSimple7702SmartAccount } from 'viem/account-abstraction'
|
41
|
-
* import { client } from './client.js'
|
42
|
-
*
|
43
|
-
* const implementation = toSimple7702SmartAccount({
|
44
|
-
* client,
|
45
|
-
* owner: '0x...',
|
46
|
-
* })
|
47
|
-
*/
|
48
|
-
export async function toSimple7702SmartAccount(
|
49
|
-
parameters: ToSimple7702SmartAccountParameters,
|
50
|
-
): Promise<ToSimple7702SmartAccountReturnType> {
|
51
|
-
const {
|
52
|
-
client,
|
53
|
-
implementation = '0xe6Cae83BdE06E4c305530e199D7217f42808555B',
|
54
|
-
getNonce,
|
55
|
-
owner,
|
56
|
-
} = parameters
|
57
|
-
|
58
|
-
const entryPoint = {
|
59
|
-
abi: entryPoint08Abi,
|
60
|
-
address: entryPoint08Address,
|
61
|
-
version: '0.8',
|
62
|
-
} as const
|
63
|
-
|
64
|
-
return toSmartAccount({
|
65
|
-
authorization: { account: owner, address: implementation },
|
66
|
-
abi,
|
67
|
-
client,
|
68
|
-
extend: { abi, owner }, // not removing abi from here as this will be a breaking change
|
69
|
-
entryPoint,
|
70
|
-
getNonce,
|
71
|
-
|
72
|
-
async decodeCalls(data) {
|
73
|
-
const result = decodeFunctionData({
|
74
|
-
abi,
|
75
|
-
data,
|
76
|
-
})
|
77
|
-
|
78
|
-
if (result.functionName === 'execute')
|
79
|
-
return [
|
80
|
-
{ to: result.args[0], value: result.args[1], data: result.args[2] },
|
81
|
-
]
|
82
|
-
if (result.functionName === 'executeBatch')
|
83
|
-
return result.args[0].map((arg) => ({
|
84
|
-
to: arg.target,
|
85
|
-
value: arg.value,
|
86
|
-
data: arg.data,
|
87
|
-
}))
|
88
|
-
throw new BaseError(`unable to decode calls for "${result.functionName}"`)
|
89
|
-
},
|
90
|
-
|
91
|
-
async encodeCalls(calls) {
|
92
|
-
if (calls.length === 1)
|
93
|
-
return encodeFunctionData({
|
94
|
-
abi,
|
95
|
-
functionName: 'execute',
|
96
|
-
args: [calls[0].to, calls[0].value ?? 0n, calls[0].data ?? '0x'],
|
97
|
-
})
|
98
|
-
return encodeFunctionData({
|
99
|
-
abi,
|
100
|
-
functionName: 'executeBatch',
|
101
|
-
args: [
|
102
|
-
calls.map((call) => ({
|
103
|
-
data: call.data ?? '0x',
|
104
|
-
target: call.to,
|
105
|
-
value: call.value ?? 0n,
|
106
|
-
})),
|
107
|
-
],
|
108
|
-
})
|
109
|
-
},
|
110
|
-
|
111
|
-
async getAddress() {
|
112
|
-
return owner.address
|
113
|
-
},
|
114
|
-
|
115
|
-
async getFactoryArgs() {
|
116
|
-
return { factory: '0x7702', factoryData: '0x' }
|
117
|
-
},
|
118
|
-
|
119
|
-
async getStubSignature() {
|
120
|
-
return '0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c'
|
121
|
-
},
|
122
|
-
|
123
|
-
async signMessage(parameters) {
|
124
|
-
const { message } = parameters
|
125
|
-
return await owner.signMessage({ message })
|
126
|
-
},
|
127
|
-
|
128
|
-
async signTypedData(parameters) {
|
129
|
-
const { domain, types, primaryType, message } =
|
130
|
-
parameters as TypedDataDefinition<TypedData, string>
|
131
|
-
return await owner.signTypedData({
|
132
|
-
domain,
|
133
|
-
message,
|
134
|
-
primaryType,
|
135
|
-
types,
|
136
|
-
})
|
137
|
-
},
|
138
|
-
|
139
|
-
async signUserOperation(parameters) {
|
140
|
-
const { chainId = client.chain!.id, ...userOperation } = parameters
|
141
|
-
|
142
|
-
const address = await this.getAddress()
|
143
|
-
|
144
|
-
const isEip7702 =
|
145
|
-
userOperation.factory &&
|
146
|
-
userOperation.factory === '0x7702' &&
|
147
|
-
userOperation.authorization
|
148
|
-
|
149
|
-
const delegation = isEip7702
|
150
|
-
? userOperation.authorization?.address
|
151
|
-
: undefined
|
152
|
-
|
153
|
-
const initCode = delegation
|
154
|
-
? userOperation.factoryData
|
155
|
-
? encodePacked(
|
156
|
-
['address', 'bytes'],
|
157
|
-
[delegation, userOperation.factoryData],
|
158
|
-
)
|
159
|
-
: encodePacked(['address'], [delegation])
|
160
|
-
: userOperation.factory && userOperation.factoryData
|
161
|
-
? concat([userOperation.factory, userOperation.factoryData])
|
162
|
-
: '0x'
|
163
|
-
|
164
|
-
const accountGasLimits = concat([
|
165
|
-
pad(numberToHex(userOperation.verificationGasLimit), { size: 16 }),
|
166
|
-
pad(numberToHex(userOperation.callGasLimit), { size: 16 }),
|
167
|
-
])
|
168
|
-
const gasFees = concat([
|
169
|
-
pad(numberToHex(userOperation.maxPriorityFeePerGas), { size: 16 }),
|
170
|
-
pad(numberToHex(userOperation.maxFeePerGas), { size: 16 }),
|
171
|
-
])
|
172
|
-
const paymasterAndData = userOperation.paymaster
|
173
|
-
? concat([
|
174
|
-
userOperation.paymaster,
|
175
|
-
pad(numberToHex(userOperation.paymasterVerificationGasLimit || 0), {
|
176
|
-
size: 16,
|
177
|
-
}),
|
178
|
-
pad(numberToHex(userOperation.paymasterPostOpGasLimit || 0), {
|
179
|
-
size: 16,
|
180
|
-
}),
|
181
|
-
userOperation.paymasterData || '0x',
|
182
|
-
])
|
183
|
-
: '0x'
|
184
|
-
|
185
|
-
const signature = await owner.signTypedData({
|
186
|
-
types: {
|
187
|
-
PackedUserOperation: [
|
188
|
-
{ type: 'address', name: 'sender' },
|
189
|
-
{ type: 'uint256', name: 'nonce' },
|
190
|
-
{ type: 'bytes', name: 'initCode' },
|
191
|
-
{ type: 'bytes', name: 'callData' },
|
192
|
-
{ type: 'bytes32', name: 'accountGasLimits' },
|
193
|
-
{ type: 'uint256', name: 'preVerificationGas' },
|
194
|
-
{ type: 'bytes32', name: 'gasFees' },
|
195
|
-
{ type: 'bytes', name: 'paymasterAndData' },
|
196
|
-
],
|
197
|
-
},
|
198
|
-
primaryType: 'PackedUserOperation',
|
199
|
-
domain: {
|
200
|
-
name: 'ERC4337',
|
201
|
-
version: '1',
|
202
|
-
chainId,
|
203
|
-
verifyingContract: entryPoint.address,
|
204
|
-
},
|
205
|
-
message: {
|
206
|
-
sender: address,
|
207
|
-
nonce: userOperation.nonce,
|
208
|
-
initCode,
|
209
|
-
callData: userOperation.callData,
|
210
|
-
accountGasLimits,
|
211
|
-
preVerificationGas: userOperation.preVerificationGas,
|
212
|
-
gasFees,
|
213
|
-
paymasterAndData,
|
214
|
-
},
|
215
|
-
})
|
216
|
-
return signature
|
217
|
-
},
|
218
|
-
})
|
219
|
-
}
|
220
|
-
|
221
|
-
/////////////////////////////////////////////////////////////////////////////////////////////
|
222
|
-
// Constants
|
223
|
-
|
224
|
-
const abi = [
|
225
|
-
{ inputs: [], name: 'ECDSAInvalidSignature', type: 'error' },
|
226
|
-
{
|
227
|
-
inputs: [{ internalType: 'uint256', name: 'length', type: 'uint256' }],
|
228
|
-
name: 'ECDSAInvalidSignatureLength',
|
229
|
-
type: 'error',
|
230
|
-
},
|
231
|
-
{
|
232
|
-
inputs: [{ internalType: 'bytes32', name: 's', type: 'bytes32' }],
|
233
|
-
name: 'ECDSAInvalidSignatureS',
|
234
|
-
type: 'error',
|
235
|
-
},
|
236
|
-
{
|
237
|
-
inputs: [
|
238
|
-
{ internalType: 'uint256', name: 'index', type: 'uint256' },
|
239
|
-
{ internalType: 'bytes', name: 'error', type: 'bytes' },
|
240
|
-
],
|
241
|
-
name: 'ExecuteError',
|
242
|
-
type: 'error',
|
243
|
-
},
|
244
|
-
{ stateMutability: 'payable', type: 'fallback' },
|
245
|
-
{
|
246
|
-
inputs: [],
|
247
|
-
name: 'entryPoint',
|
248
|
-
outputs: [
|
249
|
-
{ internalType: 'contract IEntryPoint', name: '', type: 'address' },
|
250
|
-
],
|
251
|
-
stateMutability: 'pure',
|
252
|
-
type: 'function',
|
253
|
-
},
|
254
|
-
{
|
255
|
-
inputs: [
|
256
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
257
|
-
{ internalType: 'uint256', name: 'value', type: 'uint256' },
|
258
|
-
{ internalType: 'bytes', name: 'data', type: 'bytes' },
|
259
|
-
],
|
260
|
-
name: 'execute',
|
261
|
-
outputs: [],
|
262
|
-
stateMutability: 'nonpayable',
|
263
|
-
type: 'function',
|
264
|
-
},
|
265
|
-
{
|
266
|
-
inputs: [
|
267
|
-
{
|
268
|
-
components: [
|
269
|
-
{ internalType: 'address', name: 'target', type: 'address' },
|
270
|
-
{ internalType: 'uint256', name: 'value', type: 'uint256' },
|
271
|
-
{ internalType: 'bytes', name: 'data', type: 'bytes' },
|
272
|
-
],
|
273
|
-
internalType: 'struct BaseAccount.Call[]',
|
274
|
-
name: 'calls',
|
275
|
-
type: 'tuple[]',
|
276
|
-
},
|
277
|
-
],
|
278
|
-
name: 'executeBatch',
|
279
|
-
outputs: [],
|
280
|
-
stateMutability: 'nonpayable',
|
281
|
-
type: 'function',
|
282
|
-
},
|
283
|
-
{
|
284
|
-
inputs: [],
|
285
|
-
name: 'getNonce',
|
286
|
-
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
|
287
|
-
stateMutability: 'view',
|
288
|
-
type: 'function',
|
289
|
-
},
|
290
|
-
{
|
291
|
-
inputs: [
|
292
|
-
{ internalType: 'bytes32', name: 'hash', type: 'bytes32' },
|
293
|
-
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
|
294
|
-
],
|
295
|
-
name: 'isValidSignature',
|
296
|
-
outputs: [{ internalType: 'bytes4', name: 'magicValue', type: 'bytes4' }],
|
297
|
-
stateMutability: 'view',
|
298
|
-
type: 'function',
|
299
|
-
},
|
300
|
-
{
|
301
|
-
inputs: [
|
302
|
-
{ internalType: 'address', name: '', type: 'address' },
|
303
|
-
{ internalType: 'address', name: '', type: 'address' },
|
304
|
-
{ internalType: 'uint256[]', name: '', type: 'uint256[]' },
|
305
|
-
{ internalType: 'uint256[]', name: '', type: 'uint256[]' },
|
306
|
-
{ internalType: 'bytes', name: '', type: 'bytes' },
|
307
|
-
],
|
308
|
-
name: 'onERC1155BatchReceived',
|
309
|
-
outputs: [{ internalType: 'bytes4', name: '', type: 'bytes4' }],
|
310
|
-
stateMutability: 'nonpayable',
|
311
|
-
type: 'function',
|
312
|
-
},
|
313
|
-
{
|
314
|
-
inputs: [
|
315
|
-
{ internalType: 'address', name: '', type: 'address' },
|
316
|
-
{ internalType: 'address', name: '', type: 'address' },
|
317
|
-
{ internalType: 'uint256', name: '', type: 'uint256' },
|
318
|
-
{ internalType: 'uint256', name: '', type: 'uint256' },
|
319
|
-
{ internalType: 'bytes', name: '', type: 'bytes' },
|
320
|
-
],
|
321
|
-
name: 'onERC1155Received',
|
322
|
-
outputs: [{ internalType: 'bytes4', name: '', type: 'bytes4' }],
|
323
|
-
stateMutability: 'nonpayable',
|
324
|
-
type: 'function',
|
325
|
-
},
|
326
|
-
{
|
327
|
-
inputs: [
|
328
|
-
{ internalType: 'address', name: '', type: 'address' },
|
329
|
-
{ internalType: 'address', name: '', type: 'address' },
|
330
|
-
{ internalType: 'uint256', name: '', type: 'uint256' },
|
331
|
-
{ internalType: 'bytes', name: '', type: 'bytes' },
|
332
|
-
],
|
333
|
-
name: 'onERC721Received',
|
334
|
-
outputs: [{ internalType: 'bytes4', name: '', type: 'bytes4' }],
|
335
|
-
stateMutability: 'nonpayable',
|
336
|
-
type: 'function',
|
337
|
-
},
|
338
|
-
{
|
339
|
-
inputs: [{ internalType: 'bytes4', name: 'id', type: 'bytes4' }],
|
340
|
-
name: 'supportsInterface',
|
341
|
-
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
|
342
|
-
stateMutability: 'pure',
|
343
|
-
type: 'function',
|
344
|
-
},
|
345
|
-
{
|
346
|
-
inputs: [
|
347
|
-
{
|
348
|
-
components: [
|
349
|
-
{ internalType: 'address', name: 'sender', type: 'address' },
|
350
|
-
{ internalType: 'uint256', name: 'nonce', type: 'uint256' },
|
351
|
-
{ internalType: 'bytes', name: 'initCode', type: 'bytes' },
|
352
|
-
{ internalType: 'bytes', name: 'callData', type: 'bytes' },
|
353
|
-
{
|
354
|
-
internalType: 'bytes32',
|
355
|
-
name: 'accountGasLimits',
|
356
|
-
type: 'bytes32',
|
357
|
-
},
|
358
|
-
{
|
359
|
-
internalType: 'uint256',
|
360
|
-
name: 'preVerificationGas',
|
361
|
-
type: 'uint256',
|
362
|
-
},
|
363
|
-
{ internalType: 'bytes32', name: 'gasFees', type: 'bytes32' },
|
364
|
-
{ internalType: 'bytes', name: 'paymasterAndData', type: 'bytes' },
|
365
|
-
{ internalType: 'bytes', name: 'signature', type: 'bytes' },
|
366
|
-
],
|
367
|
-
internalType: 'struct PackedUserOperation',
|
368
|
-
name: 'userOp',
|
369
|
-
type: 'tuple',
|
370
|
-
},
|
371
|
-
{ internalType: 'bytes32', name: 'userOpHash', type: 'bytes32' },
|
372
|
-
{ internalType: 'uint256', name: 'missingAccountFunds', type: 'uint256' },
|
373
|
-
],
|
374
|
-
name: 'validateUserOp',
|
375
|
-
outputs: [
|
376
|
-
{ internalType: 'uint256', name: 'validationData', type: 'uint256' },
|
377
|
-
],
|
378
|
-
stateMutability: 'nonpayable',
|
379
|
-
type: 'function',
|
380
|
-
},
|
381
|
-
{ stateMutability: 'payable', type: 'receive' },
|
382
|
-
] as const
|