@zerodev/sdk 5.2.0-alpha-1 → 5.2.0-alpha-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.
Files changed (215) hide show
  1. package/README.md +3 -0
  2. package/_cjs/accounts/index.js +9 -2
  3. package/_cjs/accounts/index.js.map +1 -1
  4. package/_cjs/accounts/kernel/abi/EIP1271Abi.js +37 -0
  5. package/_cjs/accounts/kernel/abi/EIP1271Abi.js.map +1 -0
  6. package/_cjs/accounts/kernel/abi/SafeCreateCallAbi.js +9 -0
  7. package/_cjs/accounts/kernel/abi/SafeCreateCallAbi.js.map +1 -0
  8. package/_cjs/accounts/kernel/createKernelAccount.js +124 -378
  9. package/_cjs/accounts/kernel/createKernelAccount.js.map +1 -1
  10. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeCallData.js +26 -0
  11. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeCallData.js.map +1 -0
  12. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js +16 -0
  13. package/_cjs/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js.map +1 -0
  14. package/_cjs/accounts/kernel/utils/account/ep0_7/encodeCallData.js +30 -0
  15. package/_cjs/accounts/kernel/utils/account/ep0_7/encodeCallData.js.map +1 -0
  16. package/_cjs/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js +18 -0
  17. package/_cjs/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js.map +1 -0
  18. package/_cjs/accounts/kernel/utils/common/accountMetadata.js +46 -0
  19. package/_cjs/accounts/kernel/utils/common/accountMetadata.js.map +1 -0
  20. package/_cjs/accounts/kernel/utils/common/eip712WrapHash.js +28 -0
  21. package/_cjs/accounts/kernel/utils/common/eip712WrapHash.js.map +1 -0
  22. package/_cjs/accounts/kernel/utils/common/encodeSafeCreateCall.js +14 -0
  23. package/_cjs/accounts/kernel/utils/common/encodeSafeCreateCall.js.map +1 -0
  24. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js +22 -0
  25. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js.map +1 -0
  26. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js +14 -0
  27. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js.map +1 -0
  28. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js +14 -0
  29. package/_cjs/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js.map +1 -0
  30. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js +42 -0
  31. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js.map +1 -0
  32. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteCall.js +29 -0
  33. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteCall.js.map +1 -0
  34. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteDelegateCall.js +13 -0
  35. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteDelegateCall.js.map +1 -0
  36. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteSingleCall.js +13 -0
  37. package/_cjs/accounts/kernel/utils/ep0_7/encodeExecuteSingleCall.js.map +1 -0
  38. package/_cjs/accounts/kernel/utils/ep0_7/hashKernelSignatureWrapper.js +9 -0
  39. package/_cjs/accounts/kernel/utils/ep0_7/hashKernelSignatureWrapper.js.map +1 -0
  40. package/_cjs/accounts/kernel/utils/types.js +3 -0
  41. package/_cjs/accounts/kernel/utils/types.js.map +1 -0
  42. package/_cjs/accounts/kernel/v1/createKernelV1Account.js +1 -2
  43. package/_cjs/accounts/kernel/v1/createKernelV1Account.js.map +1 -1
  44. package/_cjs/accounts/kernel/v2/abi/KernelAccountV2Abi.js +377 -0
  45. package/_cjs/accounts/kernel/v2/abi/KernelAccountV2Abi.js.map +1 -0
  46. package/_cjs/accounts/kernel/v2/abi/KernelFactoryV2Abi.js +115 -0
  47. package/_cjs/accounts/kernel/v2/abi/KernelFactoryV2Abi.js.map +1 -0
  48. package/_cjs/accounts/kernel/v2/createKernelV2Account.js +226 -0
  49. package/_cjs/accounts/kernel/v2/createKernelV2Account.js.map +1 -0
  50. package/_cjs/accounts/utils/multisend.js.map +1 -0
  51. package/_cjs/accounts/utils/toKernelPluginManager.js +19 -4
  52. package/_cjs/accounts/utils/toKernelPluginManager.js.map +1 -1
  53. package/_cjs/constants.js +2 -1
  54. package/_cjs/constants.js.map +1 -1
  55. package/_cjs/index.js +3 -2
  56. package/_cjs/index.js.map +1 -1
  57. package/_cjs/types/kernel.js.map +1 -1
  58. package/_cjs/utils.js +1 -1
  59. package/_cjs/utils.js.map +1 -1
  60. package/_esm/accounts/index.js +5 -1
  61. package/_esm/accounts/index.js.map +1 -1
  62. package/_esm/accounts/kernel/abi/EIP1271Abi.js +34 -0
  63. package/_esm/accounts/kernel/abi/EIP1271Abi.js.map +1 -0
  64. package/_esm/accounts/kernel/abi/SafeCreateCallAbi.js +6 -0
  65. package/_esm/accounts/kernel/abi/SafeCreateCallAbi.js.map +1 -0
  66. package/_esm/accounts/kernel/createKernelAccount.js +135 -398
  67. package/_esm/accounts/kernel/createKernelAccount.js.map +1 -1
  68. package/_esm/accounts/kernel/utils/account/ep0_6/encodeCallData.js +23 -0
  69. package/_esm/accounts/kernel/utils/account/ep0_6/encodeCallData.js.map +1 -0
  70. package/_esm/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js +13 -0
  71. package/_esm/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.js.map +1 -0
  72. package/_esm/accounts/kernel/utils/account/ep0_7/encodeCallData.js +28 -0
  73. package/_esm/accounts/kernel/utils/account/ep0_7/encodeCallData.js.map +1 -0
  74. package/_esm/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js +15 -0
  75. package/_esm/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.js.map +1 -0
  76. package/_esm/accounts/kernel/utils/common/accountMetadata.js +42 -0
  77. package/_esm/accounts/kernel/utils/common/accountMetadata.js.map +1 -0
  78. package/_esm/accounts/kernel/utils/common/eip712WrapHash.js +24 -0
  79. package/_esm/accounts/kernel/utils/common/eip712WrapHash.js.map +1 -0
  80. package/_esm/accounts/kernel/utils/common/encodeSafeCreateCall.js +10 -0
  81. package/_esm/accounts/kernel/utils/common/encodeSafeCreateCall.js.map +1 -0
  82. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js +18 -0
  83. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.js.map +1 -0
  84. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js +10 -0
  85. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.js.map +1 -0
  86. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js +10 -0
  87. package/_esm/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.js.map +1 -0
  88. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js +38 -0
  89. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.js.map +1 -0
  90. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteCall.js +25 -0
  91. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteCall.js.map +1 -0
  92. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteDelegateCall.js +9 -0
  93. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteDelegateCall.js.map +1 -0
  94. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteSingleCall.js +9 -0
  95. package/_esm/accounts/kernel/utils/ep0_7/encodeExecuteSingleCall.js.map +1 -0
  96. package/_esm/accounts/kernel/utils/ep0_7/hashKernelSignatureWrapper.js +5 -0
  97. package/_esm/accounts/kernel/utils/ep0_7/hashKernelSignatureWrapper.js.map +1 -0
  98. package/_esm/accounts/kernel/utils/types.js +2 -0
  99. package/_esm/accounts/kernel/utils/types.js.map +1 -0
  100. package/_esm/accounts/kernel/v1/createKernelV1Account.js +1 -2
  101. package/_esm/accounts/kernel/v1/createKernelV1Account.js.map +1 -1
  102. package/_esm/accounts/kernel/v2/abi/KernelAccountV2Abi.js +374 -0
  103. package/_esm/accounts/kernel/v2/abi/KernelAccountV2Abi.js.map +1 -0
  104. package/_esm/accounts/kernel/v2/abi/KernelFactoryV2Abi.js +112 -0
  105. package/_esm/accounts/kernel/v2/abi/KernelFactoryV2Abi.js.map +1 -0
  106. package/_esm/accounts/kernel/v2/createKernelV2Account.js +264 -0
  107. package/_esm/accounts/kernel/v2/createKernelV2Account.js.map +1 -0
  108. package/_esm/accounts/{kernel/v1 → utils}/multisend.js +1 -1
  109. package/_esm/accounts/utils/multisend.js.map +1 -0
  110. package/_esm/accounts/utils/toKernelPluginManager.js +19 -4
  111. package/_esm/accounts/utils/toKernelPluginManager.js.map +1 -1
  112. package/_esm/constants.js +3 -0
  113. package/_esm/constants.js.map +1 -1
  114. package/_esm/index.js +1 -1
  115. package/_esm/index.js.map +1 -1
  116. package/_esm/types/kernel.js.map +1 -1
  117. package/_esm/utils.js +1 -1
  118. package/_esm/utils.js.map +1 -1
  119. package/_types/accounts/index.d.ts +5 -1
  120. package/_types/accounts/index.d.ts.map +1 -1
  121. package/_types/accounts/kernel/abi/EIP1271Abi.d.ts +54 -0
  122. package/_types/accounts/kernel/abi/EIP1271Abi.d.ts.map +1 -0
  123. package/_types/accounts/kernel/abi/SafeCreateCallAbi.d.ts +35 -0
  124. package/_types/accounts/kernel/abi/SafeCreateCallAbi.d.ts.map +1 -0
  125. package/_types/accounts/kernel/createKernelAccount.d.ts +0 -54
  126. package/_types/accounts/kernel/createKernelAccount.d.ts.map +1 -1
  127. package/_types/accounts/kernel/utils/account/ep0_6/encodeCallData.d.ts +4 -0
  128. package/_types/accounts/kernel/utils/account/ep0_6/encodeCallData.d.ts.map +1 -0
  129. package/_types/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.d.ts +3 -0
  130. package/_types/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.d.ts.map +1 -0
  131. package/_types/accounts/kernel/utils/account/ep0_7/encodeCallData.d.ts +4 -0
  132. package/_types/accounts/kernel/utils/account/ep0_7/encodeCallData.d.ts.map +1 -0
  133. package/_types/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.d.ts +3 -0
  134. package/_types/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.d.ts.map +1 -0
  135. package/_types/accounts/kernel/utils/common/accountMetadata.d.ts +10 -0
  136. package/_types/accounts/kernel/utils/common/accountMetadata.d.ts.map +1 -0
  137. package/_types/accounts/kernel/utils/common/eip712WrapHash.d.ts +4 -0
  138. package/_types/accounts/kernel/utils/common/eip712WrapHash.d.ts.map +1 -0
  139. package/_types/accounts/kernel/utils/common/encodeSafeCreateCall.d.ts +2 -0
  140. package/_types/accounts/kernel/utils/common/encodeSafeCreateCall.d.ts.map +1 -0
  141. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.d.ts +3 -0
  142. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.d.ts.map +1 -0
  143. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.d.ts +3 -0
  144. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.d.ts.map +1 -0
  145. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.d.ts +3 -0
  146. package/_types/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.d.ts.map +1 -0
  147. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.d.ts +4 -0
  148. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.d.ts.map +1 -0
  149. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteCall.d.ts +16 -0
  150. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteCall.d.ts.map +1 -0
  151. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteDelegateCall.d.ts +4 -0
  152. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteDelegateCall.d.ts.map +1 -0
  153. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteSingleCall.d.ts +4 -0
  154. package/_types/accounts/kernel/utils/ep0_7/encodeExecuteSingleCall.d.ts.map +1 -0
  155. package/_types/accounts/kernel/utils/ep0_7/hashKernelSignatureWrapper.d.ts +3 -0
  156. package/_types/accounts/kernel/utils/ep0_7/hashKernelSignatureWrapper.d.ts.map +1 -0
  157. package/_types/accounts/kernel/utils/types.d.ts +8 -0
  158. package/_types/accounts/kernel/utils/types.d.ts.map +1 -0
  159. package/_types/accounts/kernel/v1/createKernelV1Account.d.ts.map +1 -1
  160. package/_types/accounts/kernel/v2/abi/KernelAccountV2Abi.d.ts +447 -0
  161. package/_types/accounts/kernel/v2/abi/KernelAccountV2Abi.d.ts.map +1 -0
  162. package/_types/accounts/kernel/v2/abi/KernelFactoryV2Abi.d.ts +109 -0
  163. package/_types/accounts/kernel/v2/abi/KernelFactoryV2Abi.d.ts.map +1 -0
  164. package/_types/accounts/kernel/v2/createKernelV2Account.d.ts +33 -0
  165. package/_types/accounts/kernel/v2/createKernelV2Account.d.ts.map +1 -0
  166. package/_types/accounts/{kernel/v1 → utils}/multisend.d.ts +1 -1
  167. package/_types/accounts/utils/multisend.d.ts.map +1 -0
  168. package/_types/accounts/utils/toKernelPluginManager.d.ts +1 -1
  169. package/_types/accounts/utils/toKernelPluginManager.d.ts.map +1 -1
  170. package/_types/constants.d.ts +1 -0
  171. package/_types/constants.d.ts.map +1 -1
  172. package/_types/index.d.ts +1 -1
  173. package/_types/index.d.ts.map +1 -1
  174. package/_types/types/index.d.ts +1 -0
  175. package/_types/types/index.d.ts.map +1 -1
  176. package/_types/types/kernel.d.ts +2 -0
  177. package/_types/types/kernel.d.ts.map +1 -1
  178. package/_types/utils.d.ts +4 -1
  179. package/_types/utils.d.ts.map +1 -1
  180. package/accounts/index.ts +5 -2
  181. package/accounts/kernel/abi/EIP1271Abi.ts +33 -0
  182. package/accounts/kernel/abi/SafeCreateCallAbi.ts +6 -0
  183. package/accounts/kernel/createKernelAccount.ts +176 -541
  184. package/accounts/kernel/utils/account/ep0_6/encodeCallData.ts +32 -0
  185. package/accounts/kernel/utils/account/ep0_6/encodeDeployCallData.ts +18 -0
  186. package/accounts/kernel/utils/account/ep0_7/encodeCallData.ts +40 -0
  187. package/accounts/kernel/utils/account/ep0_7/encodeDeployCallData.ts +20 -0
  188. package/accounts/kernel/utils/common/accountMetadata.ts +62 -0
  189. package/accounts/kernel/utils/common/eip712WrapHash.ts +48 -0
  190. package/accounts/kernel/utils/common/encodeSafeCreateCall.ts +14 -0
  191. package/accounts/kernel/utils/ep0_6/encodeExecuteBatchCall.ts +19 -0
  192. package/accounts/kernel/utils/ep0_6/encodeExecuteDelegateCall.ts +11 -0
  193. package/accounts/kernel/utils/ep0_6/encodeExecuteSingleCall.ts +11 -0
  194. package/accounts/kernel/utils/ep0_7/encodeExecuteBatchCall.ts +51 -0
  195. package/accounts/kernel/utils/ep0_7/encodeExecuteCall.ts +38 -0
  196. package/accounts/kernel/utils/ep0_7/encodeExecuteDelegateCall.ts +16 -0
  197. package/accounts/kernel/utils/ep0_7/encodeExecuteSingleCall.ts +16 -0
  198. package/accounts/kernel/utils/ep0_7/hashKernelSignatureWrapper.ts +11 -0
  199. package/accounts/kernel/utils/types.ts +8 -0
  200. package/accounts/kernel/v1/createKernelV1Account.ts +2 -3
  201. package/accounts/kernel/v2/abi/KernelAccountV2Abi.ts +373 -0
  202. package/accounts/kernel/v2/abi/KernelFactoryV2Abi.ts +111 -0
  203. package/accounts/kernel/v2/createKernelV2Account.ts +409 -0
  204. package/accounts/{kernel/v1 → utils}/multisend.ts +1 -1
  205. package/accounts/utils/toKernelPluginManager.ts +21 -7
  206. package/constants.ts +5 -0
  207. package/index.ts +2 -1
  208. package/package.json +1 -1
  209. package/types/index.ts +2 -0
  210. package/types/kernel.ts +2 -0
  211. package/utils.ts +7 -1
  212. package/_cjs/accounts/kernel/v1/multisend.js.map +0 -1
  213. package/_esm/accounts/kernel/v1/multisend.js.map +0 -1
  214. package/_types/accounts/kernel/v1/multisend.d.ts.map +0 -1
  215. /package/_cjs/accounts/{kernel/v1 → utils}/multisend.js +0 -0
@@ -0,0 +1,373 @@
1
+ export const KernelAccountV2Abi = [
2
+ {
3
+ type: "constructor",
4
+ inputs: [
5
+ {
6
+ name: "_entryPoint",
7
+ type: "address",
8
+ internalType: "contract IEntryPoint"
9
+ }
10
+ ],
11
+ stateMutability: "nonpayable"
12
+ },
13
+ { type: "fallback", stateMutability: "payable" },
14
+ { type: "receive", stateMutability: "payable" },
15
+ {
16
+ type: "function",
17
+ name: "disableMode",
18
+ inputs: [
19
+ { name: "_disableFlag", type: "bytes4", internalType: "bytes4" }
20
+ ],
21
+ outputs: [],
22
+ stateMutability: "nonpayable"
23
+ },
24
+ {
25
+ type: "function",
26
+ name: "entryPoint",
27
+ inputs: [],
28
+ outputs: [
29
+ {
30
+ name: "",
31
+ type: "address",
32
+ internalType: "contract IEntryPoint"
33
+ }
34
+ ],
35
+ stateMutability: "view"
36
+ },
37
+ {
38
+ type: "function",
39
+ name: "execute",
40
+ inputs: [
41
+ { name: "to", type: "address", internalType: "address" },
42
+ { name: "value", type: "uint256", internalType: "uint256" },
43
+ { name: "data", type: "bytes", internalType: "bytes" },
44
+ {
45
+ name: "operation",
46
+ type: "uint8",
47
+ internalType: "enum Operation"
48
+ }
49
+ ],
50
+ outputs: [],
51
+ stateMutability: "nonpayable"
52
+ },
53
+ {
54
+ type: "function",
55
+ name: "getDefaultValidator",
56
+ inputs: [],
57
+ outputs: [
58
+ {
59
+ name: "",
60
+ type: "address",
61
+ internalType: "contract IKernelValidator"
62
+ }
63
+ ],
64
+ stateMutability: "view"
65
+ },
66
+ {
67
+ type: "function",
68
+ name: "getDisabledMode",
69
+ inputs: [],
70
+ outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }],
71
+ stateMutability: "view"
72
+ },
73
+ {
74
+ type: "function",
75
+ name: "getExecution",
76
+ inputs: [{ name: "_selector", type: "bytes4", internalType: "bytes4" }],
77
+ outputs: [
78
+ {
79
+ name: "",
80
+ type: "tuple",
81
+ internalType: "struct ExecutionDetail",
82
+ components: [
83
+ {
84
+ name: "validUntil",
85
+ type: "uint48",
86
+ internalType: "uint48"
87
+ },
88
+ {
89
+ name: "validAfter",
90
+ type: "uint48",
91
+ internalType: "uint48"
92
+ },
93
+ {
94
+ name: "executor",
95
+ type: "address",
96
+ internalType: "address"
97
+ },
98
+ {
99
+ name: "validator",
100
+ type: "address",
101
+ internalType: "contract IKernelValidator"
102
+ }
103
+ ]
104
+ }
105
+ ],
106
+ stateMutability: "view"
107
+ },
108
+ {
109
+ type: "function",
110
+ name: "getLastDisabledTime",
111
+ inputs: [],
112
+ outputs: [{ name: "", type: "uint48", internalType: "uint48" }],
113
+ stateMutability: "view"
114
+ },
115
+ {
116
+ type: "function",
117
+ name: "getNonce",
118
+ inputs: [{ name: "key", type: "uint192", internalType: "uint192" }],
119
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
120
+ stateMutability: "view"
121
+ },
122
+ {
123
+ type: "function",
124
+ name: "getNonce",
125
+ inputs: [],
126
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
127
+ stateMutability: "view"
128
+ },
129
+ {
130
+ type: "function",
131
+ name: "initialize",
132
+ inputs: [
133
+ {
134
+ name: "_defaultValidator",
135
+ type: "address",
136
+ internalType: "contract IKernelValidator"
137
+ },
138
+ { name: "_data", type: "bytes", internalType: "bytes" }
139
+ ],
140
+ outputs: [],
141
+ stateMutability: "nonpayable"
142
+ },
143
+ {
144
+ type: "function",
145
+ name: "isValidSignature",
146
+ inputs: [
147
+ { name: "hash", type: "bytes32", internalType: "bytes32" },
148
+ { name: "signature", type: "bytes", internalType: "bytes" }
149
+ ],
150
+ outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }],
151
+ stateMutability: "view"
152
+ },
153
+ {
154
+ type: "function",
155
+ name: "name",
156
+ inputs: [],
157
+ outputs: [{ name: "", type: "string", internalType: "string" }],
158
+ stateMutability: "view"
159
+ },
160
+ {
161
+ type: "function",
162
+ name: "onERC1155BatchReceived",
163
+ inputs: [
164
+ { name: "", type: "address", internalType: "address" },
165
+ { name: "", type: "address", internalType: "address" },
166
+ { name: "", type: "uint256[]", internalType: "uint256[]" },
167
+ { name: "", type: "uint256[]", internalType: "uint256[]" },
168
+ { name: "", type: "bytes", internalType: "bytes" }
169
+ ],
170
+ outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }],
171
+ stateMutability: "pure"
172
+ },
173
+ {
174
+ type: "function",
175
+ name: "onERC1155Received",
176
+ inputs: [
177
+ { name: "", type: "address", internalType: "address" },
178
+ { name: "", type: "address", internalType: "address" },
179
+ { name: "", type: "uint256", internalType: "uint256" },
180
+ { name: "", type: "uint256", internalType: "uint256" },
181
+ { name: "", type: "bytes", internalType: "bytes" }
182
+ ],
183
+ outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }],
184
+ stateMutability: "pure"
185
+ },
186
+ {
187
+ type: "function",
188
+ name: "onERC721Received",
189
+ inputs: [
190
+ { name: "", type: "address", internalType: "address" },
191
+ { name: "", type: "address", internalType: "address" },
192
+ { name: "", type: "uint256", internalType: "uint256" },
193
+ { name: "", type: "bytes", internalType: "bytes" }
194
+ ],
195
+ outputs: [{ name: "", type: "bytes4", internalType: "bytes4" }],
196
+ stateMutability: "pure"
197
+ },
198
+ {
199
+ type: "function",
200
+ name: "setDefaultValidator",
201
+ inputs: [
202
+ {
203
+ name: "_defaultValidator",
204
+ type: "address",
205
+ internalType: "contract IKernelValidator"
206
+ },
207
+ { name: "_data", type: "bytes", internalType: "bytes" }
208
+ ],
209
+ outputs: [],
210
+ stateMutability: "nonpayable"
211
+ },
212
+ {
213
+ type: "function",
214
+ name: "setExecution",
215
+ inputs: [
216
+ { name: "_selector", type: "bytes4", internalType: "bytes4" },
217
+ { name: "_executor", type: "address", internalType: "address" },
218
+ {
219
+ name: "_validator",
220
+ type: "address",
221
+ internalType: "contract IKernelValidator"
222
+ },
223
+ { name: "_validUntil", type: "uint48", internalType: "uint48" },
224
+ { name: "_validAfter", type: "uint48", internalType: "uint48" },
225
+ { name: "_enableData", type: "bytes", internalType: "bytes" }
226
+ ],
227
+ outputs: [],
228
+ stateMutability: "nonpayable"
229
+ },
230
+ {
231
+ type: "function",
232
+ name: "upgradeTo",
233
+ inputs: [
234
+ {
235
+ name: "_newImplementation",
236
+ type: "address",
237
+ internalType: "address"
238
+ }
239
+ ],
240
+ outputs: [],
241
+ stateMutability: "nonpayable"
242
+ },
243
+ {
244
+ type: "function",
245
+ name: "validateUserOp",
246
+ inputs: [
247
+ {
248
+ name: "userOp",
249
+ type: "tuple",
250
+ internalType: "struct UserOperation",
251
+ components: [
252
+ {
253
+ name: "sender",
254
+ type: "address",
255
+ internalType: "address"
256
+ },
257
+ { name: "nonce", type: "uint256", internalType: "uint256" },
258
+ { name: "initCode", type: "bytes", internalType: "bytes" },
259
+ { name: "callData", type: "bytes", internalType: "bytes" },
260
+ {
261
+ name: "callGasLimit",
262
+ type: "uint256",
263
+ internalType: "uint256"
264
+ },
265
+ {
266
+ name: "verificationGasLimit",
267
+ type: "uint256",
268
+ internalType: "uint256"
269
+ },
270
+ {
271
+ name: "preVerificationGas",
272
+ type: "uint256",
273
+ internalType: "uint256"
274
+ },
275
+ {
276
+ name: "maxFeePerGas",
277
+ type: "uint256",
278
+ internalType: "uint256"
279
+ },
280
+ {
281
+ name: "maxPriorityFeePerGas",
282
+ type: "uint256",
283
+ internalType: "uint256"
284
+ },
285
+ {
286
+ name: "paymasterAndData",
287
+ type: "bytes",
288
+ internalType: "bytes"
289
+ },
290
+ { name: "signature", type: "bytes", internalType: "bytes" }
291
+ ]
292
+ },
293
+ { name: "userOpHash", type: "bytes32", internalType: "bytes32" },
294
+ {
295
+ name: "missingAccountFunds",
296
+ type: "uint256",
297
+ internalType: "uint256"
298
+ }
299
+ ],
300
+ outputs: [
301
+ {
302
+ name: "validationData",
303
+ type: "uint256",
304
+ internalType: "uint256"
305
+ }
306
+ ],
307
+ stateMutability: "nonpayable"
308
+ },
309
+ {
310
+ type: "function",
311
+ name: "version",
312
+ inputs: [],
313
+ outputs: [{ name: "", type: "string", internalType: "string" }],
314
+ stateMutability: "view"
315
+ },
316
+ {
317
+ type: "event",
318
+ name: "DefaultValidatorChanged",
319
+ inputs: [
320
+ {
321
+ name: "oldValidator",
322
+ type: "address",
323
+ indexed: true,
324
+ internalType: "address"
325
+ },
326
+ {
327
+ name: "newValidator",
328
+ type: "address",
329
+ indexed: true,
330
+ internalType: "address"
331
+ }
332
+ ],
333
+ anonymous: false
334
+ },
335
+ {
336
+ type: "event",
337
+ name: "ExecutionChanged",
338
+ inputs: [
339
+ {
340
+ name: "selector",
341
+ type: "bytes4",
342
+ indexed: true,
343
+ internalType: "bytes4"
344
+ },
345
+ {
346
+ name: "executor",
347
+ type: "address",
348
+ indexed: true,
349
+ internalType: "address"
350
+ },
351
+ {
352
+ name: "validator",
353
+ type: "address",
354
+ indexed: true,
355
+ internalType: "address"
356
+ }
357
+ ],
358
+ anonymous: false
359
+ },
360
+ {
361
+ type: "event",
362
+ name: "Upgraded",
363
+ inputs: [
364
+ {
365
+ name: "newImplementation",
366
+ type: "address",
367
+ indexed: true,
368
+ internalType: "address"
369
+ }
370
+ ],
371
+ anonymous: false
372
+ }
373
+ ] as const
@@ -0,0 +1,111 @@
1
+ export const KernelFactoryV2Abi = [
2
+ {
3
+ type: "constructor",
4
+ inputs: [
5
+ {
6
+ name: "_entryPoint",
7
+ type: "address",
8
+ internalType: "contract IEntryPoint"
9
+ }
10
+ ],
11
+ stateMutability: "nonpayable"
12
+ },
13
+ {
14
+ type: "function",
15
+ name: "createAccount",
16
+ inputs: [
17
+ {
18
+ name: "_validator",
19
+ type: "address",
20
+ internalType: "contract IKernelValidator"
21
+ },
22
+ { name: "_data", type: "bytes", internalType: "bytes" },
23
+ { name: "_index", type: "uint256", internalType: "uint256" }
24
+ ],
25
+ outputs: [
26
+ {
27
+ name: "proxy",
28
+ type: "address",
29
+ internalType: "contract EIP1967Proxy"
30
+ }
31
+ ],
32
+ stateMutability: "nonpayable"
33
+ },
34
+ {
35
+ type: "function",
36
+ name: "entryPoint",
37
+ inputs: [],
38
+ outputs: [
39
+ {
40
+ name: "",
41
+ type: "address",
42
+ internalType: "contract IEntryPoint"
43
+ }
44
+ ],
45
+ stateMutability: "view"
46
+ },
47
+ {
48
+ type: "function",
49
+ name: "getAccountAddress",
50
+ inputs: [
51
+ {
52
+ name: "_validator",
53
+ type: "address",
54
+ internalType: "contract IKernelValidator"
55
+ },
56
+ { name: "_data", type: "bytes", internalType: "bytes" },
57
+ { name: "_index", type: "uint256", internalType: "uint256" }
58
+ ],
59
+ outputs: [{ name: "", type: "address", internalType: "address" }],
60
+ stateMutability: "view"
61
+ },
62
+ {
63
+ type: "function",
64
+ name: "kernelTemplate",
65
+ inputs: [],
66
+ outputs: [
67
+ { name: "", type: "address", internalType: "contract TempKernel" }
68
+ ],
69
+ stateMutability: "view"
70
+ },
71
+ {
72
+ type: "function",
73
+ name: "nextTemplate",
74
+ inputs: [],
75
+ outputs: [
76
+ { name: "", type: "address", internalType: "contract Kernel" }
77
+ ],
78
+ stateMutability: "view"
79
+ },
80
+ {
81
+ type: "event",
82
+ name: "AccountCreated",
83
+ inputs: [
84
+ {
85
+ name: "account",
86
+ type: "address",
87
+ indexed: true,
88
+ internalType: "address"
89
+ },
90
+ {
91
+ name: "validator",
92
+ type: "address",
93
+ indexed: true,
94
+ internalType: "address"
95
+ },
96
+ {
97
+ name: "data",
98
+ type: "bytes",
99
+ indexed: false,
100
+ internalType: "bytes"
101
+ },
102
+ {
103
+ name: "index",
104
+ type: "uint256",
105
+ indexed: false,
106
+ internalType: "uint256"
107
+ }
108
+ ],
109
+ anonymous: false
110
+ }
111
+ ] as const