├── .eslintrc.json ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── contracts ├── .github │ └── workflows │ │ └── test.yml ├── .gitignore ├── README.md ├── broadcast │ └── WalletFactory.s.sol │ │ └── 5 │ │ ├── run-1691877532.json │ │ ├── run-1691877544.json │ │ └── run-1691877571.json ├── foundry.toml ├── remappings.txt ├── script │ ├── Counter.s.sol │ └── WalletFactory.s.sol └── src │ ├── Wallet.sol │ └── WalletFactory.sol ├── next.config.js ├── package.json ├── pnpm-lock.yaml ├── postcss.config.js ├── prisma └── schema.prisma ├── public ├── next.svg └── vercel.svg ├── src ├── app │ ├── [walletAddress] │ │ └── page.tsx │ ├── api │ │ ├── create-signature │ │ │ └── route.ts │ │ ├── create-transaction │ │ │ └── route.ts │ │ ├── create-wallet │ │ │ └── route.ts │ │ ├── fetch-transactions │ │ │ └── route.ts │ │ ├── fetch-wallet │ │ │ └── route.ts │ │ ├── fetch-wallets │ │ │ └── route.ts │ │ └── update-wallet-deployed │ │ │ └── route.ts │ ├── create-wallet │ │ └── page.tsx │ ├── favicon.ico │ ├── globals.css │ ├── layout.tsx │ └── page.tsx ├── components │ ├── button.tsx │ ├── createSCW.tsx │ ├── footer.tsx │ ├── icon.tsx │ ├── navbar.tsx │ ├── providers.tsx │ ├── transactionList.tsx │ └── walletList.tsx ├── hooks │ └── useIsMounted.ts └── utils │ ├── constants.ts │ ├── db.ts │ ├── getContracts.ts │ ├── getUserOpForETHTransfer.ts │ ├── getUserOpHash.ts │ └── getUserOperationBuilder.ts ├── tailwind.config.ts └── tsconfig.json /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | .env 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | 37 | contracts/broadcast/**/* 38 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "contracts/lib/forge-std"] 2 | path = contracts/lib/forge-std 3 | url = https://github.com/foundry-rs/forge-std 4 | [submodule "contracts/lib/account-abstraction"] 5 | path = contracts/lib/account-abstraction 6 | url = https://github.com/eth-infinitism/account-abstraction 7 | [submodule "contracts/lib/openzeppelin-contracts"] 8 | path = contracts/lib/openzeppelin-contracts 9 | url = https://github.com/OpenZeppelin/openzeppelin-contracts 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | ``` 14 | 15 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 16 | 17 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 18 | 19 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 20 | 21 | ## Learn More 22 | 23 | To learn more about Next.js, take a look at the following resources: 24 | 25 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 26 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 27 | 28 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 29 | 30 | ## Deploy on Vercel 31 | 32 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 33 | 34 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 35 | -------------------------------------------------------------------------------- /contracts/.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: workflow_dispatch 4 | 5 | env: 6 | FOUNDRY_PROFILE: ci 7 | 8 | jobs: 9 | check: 10 | strategy: 11 | fail-fast: true 12 | 13 | name: Foundry project 14 | runs-on: ubuntu-latest 15 | steps: 16 | - uses: actions/checkout@v3 17 | with: 18 | submodules: recursive 19 | 20 | - name: Install Foundry 21 | uses: foundry-rs/foundry-toolchain@v1 22 | with: 23 | version: nightly 24 | 25 | - name: Run Forge build 26 | run: | 27 | forge --version 28 | forge build --sizes 29 | id: build 30 | 31 | - name: Run Forge tests 32 | run: | 33 | forge test -vvv 34 | id: test 35 | -------------------------------------------------------------------------------- /contracts/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler files 2 | cache/ 3 | out/ 4 | 5 | # Ignores development broadcast logs 6 | !/broadcast 7 | /broadcast/*/31337/ 8 | /broadcast/**/dry-run/ 9 | 10 | # Docs 11 | docs/ 12 | 13 | # Dotenv file 14 | .env 15 | -------------------------------------------------------------------------------- /contracts/README.md: -------------------------------------------------------------------------------- 1 | ## Foundry 2 | 3 | **Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.** 4 | 5 | Foundry consists of: 6 | 7 | - **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools). 8 | - **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data. 9 | - **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network. 10 | - **Chisel**: Fast, utilitarian, and verbose solidity REPL. 11 | 12 | ## Documentation 13 | 14 | https://book.getfoundry.sh/ 15 | 16 | ## Usage 17 | 18 | ### Build 19 | 20 | ```shell 21 | $ forge build 22 | ``` 23 | 24 | ### Test 25 | 26 | ```shell 27 | $ forge test 28 | ``` 29 | 30 | ### Format 31 | 32 | ```shell 33 | $ forge fmt 34 | ``` 35 | 36 | ### Gas Snapshots 37 | 38 | ```shell 39 | $ forge snapshot 40 | ``` 41 | 42 | ### Anvil 43 | 44 | ```shell 45 | $ anvil 46 | ``` 47 | 48 | ### Deploy 49 | 50 | ```shell 51 | $ forge script script/Counter.s.sol:CounterScript --rpc-url --private-key 52 | ``` 53 | 54 | ### Cast 55 | 56 | ```shell 57 | $ cast 58 | ``` 59 | 60 | ### Help 61 | 62 | ```shell 63 | $ forge --help 64 | $ anvil --help 65 | $ cast --help 66 | ``` 67 | -------------------------------------------------------------------------------- /contracts/broadcast/WalletFactory.s.sol/5/run-1691877532.json: -------------------------------------------------------------------------------- 1 | { 2 | "transactions": [ 3 | { 4 | "hash": "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9", 5 | "transactionType": "CREATE", 6 | "contractName": "WalletFactory", 7 | "contractAddress": "0xFc38Cf2cD3DA80813a1BF1202f3A02E4b8ceAb21", 8 | "function": null, 9 | "arguments": [ 10 | "0x0576a174D229E3cFA37253523E645A78A0C91B57" 11 | ], 12 | "transaction": { 13 | "type": "0x02", 14 | "from": "0x01573df433484fcbe6325a0c6e051dc62ab107d1", 15 | "gas": "0x2e26ee", 16 | "value": "0x0", 17 | "data": "0x60a060405234801561001057600080fd5b50604051612a91380380612a9183398101604081905261002f91610088565b8060405161003c9061007b565b6001600160a01b039091168152602001604051809103906000f080158015610068573d6000803e3d6000fd5b506001600160a01b0316608052506100b8565b61200280610a8f83390190565b60006020828403121561009a57600080fd5b81516001600160a01b03811681146100b157600080fd5b9392505050565b6080516109b06100df60003960008181604b0152818160fc015261020c01526109b06000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80638117abc11461004657806394f7e8e014610089578063b54c02f21461009c575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006d6100973660046102ec565b6100af565b61006d6100aa3660046102ec565b61019c565b600080836040516024016100c391906103b7565b60408051601f19818403018152918152602080830180516001600160e01b031663a224cee760e01b1790529051919250600091610124917f000000000000000000000000000000000000000000000000000000000000000091859101610428565b6040516020818303038152906040529050600060405180602001610147906102ac565b601f1982820381018352601f90910116604081905261016b9190849060200161046a565b60408051601f198184030181529190528051602082012090915061018f868261026e565b9450505050505b92915050565b6000806101a984846100af565b90506001600160a01b0381163b80156101c457509050610196565b6000856040516024016101d791906103b7565b60408051601f198184030181529181526020820180516001600160e01b031663a224cee760e01b1790525190915060009086907f0000000000000000000000000000000000000000000000000000000000000000908490610237906102ac565b610242929190610428565b8190604051809103906000f5905080158015610262573d6000803e3d6000fd5b50979650505050505050565b600061027b838330610282565b9392505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b6104e1806200049a83390190565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b03811681146102e757600080fd5b919050565b600080604083850312156102ff57600080fd5b823567ffffffffffffffff8082111561031757600080fd5b818501915085601f83011261032b57600080fd5b813560208282111561033f5761033f6102ba565b8160051b604051601f19603f83011681018181108682111715610364576103646102ba565b60405292835281830193508481018201928984111561038257600080fd5b948201945b838610156103a757610398866102d0565b85529482019493820193610387565b9997909101359750505050505050565b6020808252825182820181905260009190848201906040850190845b818110156103f85783516001600160a01b0316835292840192918401916001016103d3565b50909695505050505050565b60005b8381101561041f578181015183820152602001610407565b50506000910152565b60018060a01b03831681526040602082015260008251806040840152610455816060850160208701610404565b601f01601f1916919091016060019392505050565b6000835161047c818460208801610404565b835190830190610490818360208801610404565b0194935050505056fe60806040526040516104e13803806104e1833981016040819052610022916102de565b61002e82826000610035565b50506103fb565b61003e83610061565b60008251118061004b5750805b1561005c5761005a83836100a1565b505b505050565b61006a816100cd565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100c683836040518060600160405280602781526020016104ba60279139610180565b9392505050565b6001600160a01b0381163b61013f5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b03168560405161019d91906103ac565b600060405180830381855af49150503d80600081146101d8576040519150601f19603f3d011682016040523d82523d6000602084013e6101dd565b606091505b5090925090506101ef868383876101f9565b9695505050505050565b60608315610268578251600003610261576001600160a01b0385163b6102615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610136565b5081610272565b610272838361027a565b949350505050565b81511561028a5781518083602001fd5b8060405162461bcd60e51b815260040161013691906103c8565b634e487b7160e01b600052604160045260246000fd5b60005b838110156102d55781810151838201526020016102bd565b50506000910152565b600080604083850312156102f157600080fd5b82516001600160a01b038116811461030857600080fd5b60208401519092506001600160401b038082111561032557600080fd5b818501915085601f83011261033957600080fd5b81518181111561034b5761034b6102a4565b604051601f8201601f19908116603f01168101908382118183101715610373576103736102a4565b8160405282815288602084870101111561038c57600080fd5b61039d8360208301602088016102ba565b80955050505050509250929050565b600082516103be8184602087016102ba565b9190910192915050565b60208152600082518060208401526103e78160408501602087016102ba565b601f01601f19169190910160400192915050565b60b1806104096000396000f3fe608060405236601057600e6013565b005b600e5b601f601b6021565b6058565b565b600060537f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156076573d6000f35b3d6000fdfea26469706673582212203dec9c911290ef373ddf7f0f5f2642676b9f1df249c636bb619bbbda645930d864736f6c63430008150033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f245e7c4bcaec93e6fffaed3093de67658833ba6fa8dd090484f0411d50146e164736f6c6343000815003360c0604052306080523480156200001557600080fd5b506040516200200238038062002002833981016040819052620000389162000117565b6001600160a01b03811660a0526200004f62000056565b5062000149565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000115576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012a57600080fd5b81516001600160a01b03811681146200014257600080fd5b9392505050565b60805160a051611e54620001ae600039600081816102eb015281816106c401528181610a4601528181610ade01528181610c900152610ef4015260008181610464015281816104ad0152818161074c0152818161078c015261081f0152611e546000f3fe60806040526004361061010c5760003560e01c80634f1ef28611610095578063b61d27f611610064578063b61d27f61461030f578063bc197c811461032f578063c399ec881461035e578063d087d28814610373578063f23a6e611461038857600080fd5b80634f1ef2861461029457806352d1902d146102a7578063a224cee7146102bc578063b0d691fe146102dc57600080fd5b80631d06d40d116100dc5780631d06d40d146101f15780633659cfe61461021e5780633a871cdd1461023e57806347e1da2a1461026c5780634a58db191461028c57600080fd5b806223de291461011857806301ffc9a71461013f578063025e7c2714610174578063150b7a02146101ac57600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013d6101333660046114ee565b5050505050505050565b005b34801561014b57600080fd5b5061015f61015a366004611598565b6103b5565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046115c2565b610407565b6040516001600160a01b03909116815260200161016b565b3480156101b857600080fd5b506101d86101c73660046115db565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161016b565b3480156101fd57600080fd5b5061021161020c366004611721565b610431565b60405161016b9190611826565b34801561022a57600080fd5b5061013d610239366004611839565b61045a565b34801561024a57600080fd5b5061025e610259366004611854565b610542565b60405190815260200161016b565b34801561027857600080fd5b5061013d6102873660046118eb565b610568565b61013d6106c2565b61013d6102a2366004611984565b610742565b3480156102b357600080fd5b5061025e610812565b3480156102c857600080fd5b5061013d6102d73660046119d1565b6108c5565b3480156102e857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610194565b34801561031b57600080fd5b5061013d61032a366004611a68565b6109d7565b34801561033b57600080fd5b506101d861034a366004611ac1565b63bc197c8160e01b98975050505050505050565b34801561036a57600080fd5b5061025e610a26565b34801561037f57600080fd5b5061025e610ab7565b34801561039457600080fd5b506101d86103a3366004611b5a565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630a85bd0160e11b14806103e657506001600160e01b03198216630271189760e51b145b8061040157506001600160e01b031982166301ffc9a760e01b145b92915050565b6001818154811061041757600080fd5b6000918252602090912001546001600160a01b0316905081565b6060816040516020016104449190611bbf565b6040516020818303038152906040529050919050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104ab5760405162461bcd60e51b81526004016104a290611c21565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104f4600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b03161461051a5760405162461bcd60e51b81526004016104a290611c6d565b61052381610b0d565b6040805160008082526020820190925261053f91839190610b15565b50565b600061054c610c85565b6105568484610cff565b905061056182610de6565b9392505050565b610570610c85565b8481146105b55760405162461bcd60e51b815260206004820152601360248201527277726f6e67206172726179206c656e6774687360681b60448201526064016104a2565b8281146105fb5760405162461bcd60e51b815260206004820152601460248201527377726f6e672076616c756573206c656e6774687360601b60448201526064016104a2565b60005b858110156106b9576106a787878381811061061b5761061b611cb9565b90506020020160208101906106309190611839565b86868481811061064257610642611cb9565b9050602002013585858581811061065b5761065b611cb9565b905060200281019061066d9190611ccf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b806106b181611d15565b9150506105fe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000060405163b760faf960e01b81523060048201526001600160a01b03919091169063b760faf99034906024016000604051808303818588803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b5050505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361078a5760405162461bcd60e51b81526004016104a290611c21565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107d3600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b81526004016104a290611c6d565b61080282610b0d565b61080e82826001610b15565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104a2565b50600080516020611dd883398151915290565b600054610100900460ff16158080156108e55750600054600160ff909116105b806108ff5750303b1580156108ff575060005460ff166001145b6109625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104a2565b6000805460ff191660011790558015610985576000805461ff0019166101001790555b61098e82610ea3565b801561080e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6109df610c85565b610a20848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa158015610a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190611d3c565b905090565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610a71565b61053f610c85565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610b4d57610b4883610f57565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610ba7575060408051601f3d908101601f19168201909252610ba491810190611d3c565b60015b610c0a5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104a2565b600080516020611dd88339815191528114610c795760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104a2565b50610b48838383610ff3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cfd5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016104a2565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81206000610d3e610140860186611ccf565b810190610d4b9190611721565b905060005b600154811015610dda57610d86828281518110610d6f57610d6f611cb9565b60200260200101518461101890919063ffffffff16565b6001600160a01b031660018281548110610da257610da2611cb9565b6000918252602090912001546001600160a01b031614610dc85760019350505050610401565b80610dd281611d15565b915050610d50565b50600095945050505050565b801561053f57604051600090339060001990849084818181858888f193505050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e61073b565b600080846001600160a01b03168484604051610e4f9190611d55565b60006040518083038185875af1925050503d8060008114610e8c576040519150601f19603f3d011682016040523d82523d6000602084013e610e91565b606091505b50915091508161073b57805160208201fd5b600154610ede5760405162461bcd60e51b81526020600482015260096024820152686e6f206f776e65727360b81b60448201526064016104a2565b8051610ef1906001906020840190611417565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f8afffd56adb385a94a6b7426d4e3f51e2f9de8984c19093c2ddccf8fcfddfe8d6001604051610f4c9190611d71565b60405180910390a250565b6001600160a01b0381163b610fc45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104a2565b600080516020611dd883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b610ffc8361103c565b6000825111806110095750805b15610b4857610a20838361107c565b600080600061102785856110a1565b91509150611034816110e6565b509392505050565b61104581610f57565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606105618383604051806060016040528060278152602001611df860279139611230565b60008082516041036110d75760208301516040840151606085015160001a6110cb878285856112a8565b945094505050506110df565b506000905060025b9250929050565b60008160048111156110fa576110fa611dc1565b036111025750565b600181600481111561111657611116611dc1565b036111635760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a2565b600281600481111561117757611177611dc1565b036111c45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a2565b60038160048111156111d8576111d8611dc1565b0361053f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a2565b6060600080856001600160a01b03168560405161124d9190611d55565b600060405180830381855af49150503d8060008114611288576040519150601f19603f3d011682016040523d82523d6000602084013e61128d565b606091505b509150915061129e8683838761136c565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112df5750600090506003611363565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611333573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661135c57600060019250925050611363565b9150600090505b94509492505050565b606083156113db5782516000036113d4576001600160a01b0385163b6113d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104a2565b50816113e5565b6113e583836113ed565b949350505050565b8151156113fd5781518083602001fd5b8060405162461bcd60e51b81526004016104a29190611826565b82805482825590600052602060002090810192821561146c579160200282015b8281111561146c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611437565b5061147892915061147c565b5090565b5b80821115611478576000815560010161147d565b80356001600160a01b03811681146114a857600080fd5b919050565b60008083601f8401126114bf57600080fd5b5081356001600160401b038111156114d657600080fd5b6020830191508360208285010111156110df57600080fd5b60008060008060008060008060c0898b03121561150a57600080fd5b61151389611491565b975061152160208a01611491565b965061152f60408a01611491565b95506060890135945060808901356001600160401b038082111561155257600080fd5b61155e8c838d016114ad565b909650945060a08b013591508082111561157757600080fd5b506115848b828c016114ad565b999c989b5096995094979396929594505050565b6000602082840312156115aa57600080fd5b81356001600160e01b03198116811461056157600080fd5b6000602082840312156115d457600080fd5b5035919050565b6000806000806000608086880312156115f357600080fd5b6115fc86611491565b945061160a60208701611491565b93506040860135925060608601356001600160401b0381111561162c57600080fd5b611638888289016114ad565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561168757611687611649565b604052919050565b60006001600160401b038211156116a8576116a8611649565b5060051b60200190565b600082601f8301126116c357600080fd5b81356001600160401b038111156116dc576116dc611649565b6116ef601f8201601f191660200161165f565b81815284602083860101111561170457600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561173457600080fd5b82356001600160401b038082111561174b57600080fd5b818501915085601f83011261175f57600080fd5b813561177261176d8261168f565b61165f565b81815260059190911b8301840190848101908883111561179157600080fd5b8585015b838110156117c9578035858111156117ad5760008081fd5b6117bb8b89838a01016116b2565b845250918601918601611795565b5098975050505050505050565b60005b838110156117f15781810151838201526020016117d9565b50506000910152565b600081518084526118128160208601602086016117d6565b601f01601f19169290920160200192915050565b60208152600061056160208301846117fa565b60006020828403121561184b57600080fd5b61056182611491565b60008060006060848603121561186957600080fd5b83356001600160401b0381111561187f57600080fd5b8401610160818703121561189257600080fd5b95602085013595506040909401359392505050565b60008083601f8401126118b957600080fd5b5081356001600160401b038111156118d057600080fd5b6020830191508360208260051b85010111156110df57600080fd5b6000806000806000806060878903121561190457600080fd5b86356001600160401b038082111561191b57600080fd5b6119278a838b016118a7565b9098509650602089013591508082111561194057600080fd5b61194c8a838b016118a7565b9096509450604089013591508082111561196557600080fd5b5061197289828a016118a7565b979a9699509497509295939492505050565b6000806040838503121561199757600080fd5b6119a083611491565b915060208301356001600160401b038111156119bb57600080fd5b6119c7858286016116b2565b9150509250929050565b600060208083850312156119e457600080fd5b82356001600160401b038111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1961176d8261168f565b81815260059190911b82018301908381019087831115611a3857600080fd5b928401925b82841015611a5d57611a4e84611491565b82529284019290840190611a3d565b979650505050505050565b60008060008060608587031215611a7e57600080fd5b611a8785611491565b93506020850135925060408501356001600160401b03811115611aa957600080fd5b611ab5878288016114ad565b95989497509550505050565b60008060008060008060008060a0898b031215611add57600080fd5b611ae689611491565b9750611af460208a01611491565b965060408901356001600160401b0380821115611b1057600080fd5b611b1c8c838d016118a7565b909850965060608b0135915080821115611b3557600080fd5b611b418c838d016118a7565b909650945060808b013591508082111561157757600080fd5b60008060008060008060a08789031215611b7357600080fd5b611b7c87611491565b9550611b8a60208801611491565b9450604087013593506060870135925060808701356001600160401b03811115611bb357600080fd5b61197289828a016114ad565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1457603f19888603018452611c028583516117fa565b94509285019290850190600101611be6565b5092979650505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611ce657600080fd5b8301803591506001600160401b03821115611d0057600080fd5b6020019150368190038213156110df57600080fd5b600060018201611d3557634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215611d4e57600080fd5b5051919050565b60008251611d678184602087016117d6565b9190910192915050565b6020808252825482820181905260008481528281209092916040850190845b81811015611db55783546001600160a01b031683526001938401939285019201611d90565b50909695505050505050565b634e487b7160e01b600052602160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201614606408bc8ac414e14c9f7bd42da9914d0f1a160fb5ca36339b350f09541764736f6c634300081500330000000000000000000000000576a174d229e3cfa37253523e645a78a0c91b57", 18 | "nonce": "0x2a", 19 | "accessList": [] 20 | }, 21 | "additionalContracts": [ 22 | { 23 | "transactionType": "CREATE", 24 | "address": "0x5A6Db894B2bAB1Ee04bE3595dC6bf3790088c4C1", 25 | "initCode": "0x60c0604052306080523480156200001557600080fd5b506040516200200238038062002002833981016040819052620000389162000117565b6001600160a01b03811660a0526200004f62000056565b5062000149565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000115576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012a57600080fd5b81516001600160a01b03811681146200014257600080fd5b9392505050565b60805160a051611e54620001ae600039600081816102eb015281816106c401528181610a4601528181610ade01528181610c900152610ef4015260008181610464015281816104ad0152818161074c0152818161078c015261081f0152611e546000f3fe60806040526004361061010c5760003560e01c80634f1ef28611610095578063b61d27f611610064578063b61d27f61461030f578063bc197c811461032f578063c399ec881461035e578063d087d28814610373578063f23a6e611461038857600080fd5b80634f1ef2861461029457806352d1902d146102a7578063a224cee7146102bc578063b0d691fe146102dc57600080fd5b80631d06d40d116100dc5780631d06d40d146101f15780633659cfe61461021e5780633a871cdd1461023e57806347e1da2a1461026c5780634a58db191461028c57600080fd5b806223de291461011857806301ffc9a71461013f578063025e7c2714610174578063150b7a02146101ac57600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013d6101333660046114ee565b5050505050505050565b005b34801561014b57600080fd5b5061015f61015a366004611598565b6103b5565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046115c2565b610407565b6040516001600160a01b03909116815260200161016b565b3480156101b857600080fd5b506101d86101c73660046115db565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161016b565b3480156101fd57600080fd5b5061021161020c366004611721565b610431565b60405161016b9190611826565b34801561022a57600080fd5b5061013d610239366004611839565b61045a565b34801561024a57600080fd5b5061025e610259366004611854565b610542565b60405190815260200161016b565b34801561027857600080fd5b5061013d6102873660046118eb565b610568565b61013d6106c2565b61013d6102a2366004611984565b610742565b3480156102b357600080fd5b5061025e610812565b3480156102c857600080fd5b5061013d6102d73660046119d1565b6108c5565b3480156102e857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610194565b34801561031b57600080fd5b5061013d61032a366004611a68565b6109d7565b34801561033b57600080fd5b506101d861034a366004611ac1565b63bc197c8160e01b98975050505050505050565b34801561036a57600080fd5b5061025e610a26565b34801561037f57600080fd5b5061025e610ab7565b34801561039457600080fd5b506101d86103a3366004611b5a565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630a85bd0160e11b14806103e657506001600160e01b03198216630271189760e51b145b8061040157506001600160e01b031982166301ffc9a760e01b145b92915050565b6001818154811061041757600080fd5b6000918252602090912001546001600160a01b0316905081565b6060816040516020016104449190611bbf565b6040516020818303038152906040529050919050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104ab5760405162461bcd60e51b81526004016104a290611c21565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104f4600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b03161461051a5760405162461bcd60e51b81526004016104a290611c6d565b61052381610b0d565b6040805160008082526020820190925261053f91839190610b15565b50565b600061054c610c85565b6105568484610cff565b905061056182610de6565b9392505050565b610570610c85565b8481146105b55760405162461bcd60e51b815260206004820152601360248201527277726f6e67206172726179206c656e6774687360681b60448201526064016104a2565b8281146105fb5760405162461bcd60e51b815260206004820152601460248201527377726f6e672076616c756573206c656e6774687360601b60448201526064016104a2565b60005b858110156106b9576106a787878381811061061b5761061b611cb9565b90506020020160208101906106309190611839565b86868481811061064257610642611cb9565b9050602002013585858581811061065b5761065b611cb9565b905060200281019061066d9190611ccf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b806106b181611d15565b9150506105fe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000060405163b760faf960e01b81523060048201526001600160a01b03919091169063b760faf99034906024016000604051808303818588803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b5050505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361078a5760405162461bcd60e51b81526004016104a290611c21565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107d3600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b81526004016104a290611c6d565b61080282610b0d565b61080e82826001610b15565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104a2565b50600080516020611dd883398151915290565b600054610100900460ff16158080156108e55750600054600160ff909116105b806108ff5750303b1580156108ff575060005460ff166001145b6109625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104a2565b6000805460ff191660011790558015610985576000805461ff0019166101001790555b61098e82610ea3565b801561080e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6109df610c85565b610a20848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa158015610a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190611d3c565b905090565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610a71565b61053f610c85565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610b4d57610b4883610f57565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610ba7575060408051601f3d908101601f19168201909252610ba491810190611d3c565b60015b610c0a5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104a2565b600080516020611dd88339815191528114610c795760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104a2565b50610b48838383610ff3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cfd5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016104a2565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81206000610d3e610140860186611ccf565b810190610d4b9190611721565b905060005b600154811015610dda57610d86828281518110610d6f57610d6f611cb9565b60200260200101518461101890919063ffffffff16565b6001600160a01b031660018281548110610da257610da2611cb9565b6000918252602090912001546001600160a01b031614610dc85760019350505050610401565b80610dd281611d15565b915050610d50565b50600095945050505050565b801561053f57604051600090339060001990849084818181858888f193505050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e61073b565b600080846001600160a01b03168484604051610e4f9190611d55565b60006040518083038185875af1925050503d8060008114610e8c576040519150601f19603f3d011682016040523d82523d6000602084013e610e91565b606091505b50915091508161073b57805160208201fd5b600154610ede5760405162461bcd60e51b81526020600482015260096024820152686e6f206f776e65727360b81b60448201526064016104a2565b8051610ef1906001906020840190611417565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f8afffd56adb385a94a6b7426d4e3f51e2f9de8984c19093c2ddccf8fcfddfe8d6001604051610f4c9190611d71565b60405180910390a250565b6001600160a01b0381163b610fc45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104a2565b600080516020611dd883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b610ffc8361103c565b6000825111806110095750805b15610b4857610a20838361107c565b600080600061102785856110a1565b91509150611034816110e6565b509392505050565b61104581610f57565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606105618383604051806060016040528060278152602001611df860279139611230565b60008082516041036110d75760208301516040840151606085015160001a6110cb878285856112a8565b945094505050506110df565b506000905060025b9250929050565b60008160048111156110fa576110fa611dc1565b036111025750565b600181600481111561111657611116611dc1565b036111635760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a2565b600281600481111561117757611177611dc1565b036111c45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a2565b60038160048111156111d8576111d8611dc1565b0361053f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a2565b6060600080856001600160a01b03168560405161124d9190611d55565b600060405180830381855af49150503d8060008114611288576040519150601f19603f3d011682016040523d82523d6000602084013e61128d565b606091505b509150915061129e8683838761136c565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112df5750600090506003611363565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611333573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661135c57600060019250925050611363565b9150600090505b94509492505050565b606083156113db5782516000036113d4576001600160a01b0385163b6113d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104a2565b50816113e5565b6113e583836113ed565b949350505050565b8151156113fd5781518083602001fd5b8060405162461bcd60e51b81526004016104a29190611826565b82805482825590600052602060002090810192821561146c579160200282015b8281111561146c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611437565b5061147892915061147c565b5090565b5b80821115611478576000815560010161147d565b80356001600160a01b03811681146114a857600080fd5b919050565b60008083601f8401126114bf57600080fd5b5081356001600160401b038111156114d657600080fd5b6020830191508360208285010111156110df57600080fd5b60008060008060008060008060c0898b03121561150a57600080fd5b61151389611491565b975061152160208a01611491565b965061152f60408a01611491565b95506060890135945060808901356001600160401b038082111561155257600080fd5b61155e8c838d016114ad565b909650945060a08b013591508082111561157757600080fd5b506115848b828c016114ad565b999c989b5096995094979396929594505050565b6000602082840312156115aa57600080fd5b81356001600160e01b03198116811461056157600080fd5b6000602082840312156115d457600080fd5b5035919050565b6000806000806000608086880312156115f357600080fd5b6115fc86611491565b945061160a60208701611491565b93506040860135925060608601356001600160401b0381111561162c57600080fd5b611638888289016114ad565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561168757611687611649565b604052919050565b60006001600160401b038211156116a8576116a8611649565b5060051b60200190565b600082601f8301126116c357600080fd5b81356001600160401b038111156116dc576116dc611649565b6116ef601f8201601f191660200161165f565b81815284602083860101111561170457600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561173457600080fd5b82356001600160401b038082111561174b57600080fd5b818501915085601f83011261175f57600080fd5b813561177261176d8261168f565b61165f565b81815260059190911b8301840190848101908883111561179157600080fd5b8585015b838110156117c9578035858111156117ad5760008081fd5b6117bb8b89838a01016116b2565b845250918601918601611795565b5098975050505050505050565b60005b838110156117f15781810151838201526020016117d9565b50506000910152565b600081518084526118128160208601602086016117d6565b601f01601f19169290920160200192915050565b60208152600061056160208301846117fa565b60006020828403121561184b57600080fd5b61056182611491565b60008060006060848603121561186957600080fd5b83356001600160401b0381111561187f57600080fd5b8401610160818703121561189257600080fd5b95602085013595506040909401359392505050565b60008083601f8401126118b957600080fd5b5081356001600160401b038111156118d057600080fd5b6020830191508360208260051b85010111156110df57600080fd5b6000806000806000806060878903121561190457600080fd5b86356001600160401b038082111561191b57600080fd5b6119278a838b016118a7565b9098509650602089013591508082111561194057600080fd5b61194c8a838b016118a7565b9096509450604089013591508082111561196557600080fd5b5061197289828a016118a7565b979a9699509497509295939492505050565b6000806040838503121561199757600080fd5b6119a083611491565b915060208301356001600160401b038111156119bb57600080fd5b6119c7858286016116b2565b9150509250929050565b600060208083850312156119e457600080fd5b82356001600160401b038111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1961176d8261168f565b81815260059190911b82018301908381019087831115611a3857600080fd5b928401925b82841015611a5d57611a4e84611491565b82529284019290840190611a3d565b979650505050505050565b60008060008060608587031215611a7e57600080fd5b611a8785611491565b93506020850135925060408501356001600160401b03811115611aa957600080fd5b611ab5878288016114ad565b95989497509550505050565b60008060008060008060008060a0898b031215611add57600080fd5b611ae689611491565b9750611af460208a01611491565b965060408901356001600160401b0380821115611b1057600080fd5b611b1c8c838d016118a7565b909850965060608b0135915080821115611b3557600080fd5b611b418c838d016118a7565b909650945060808b013591508082111561157757600080fd5b60008060008060008060a08789031215611b7357600080fd5b611b7c87611491565b9550611b8a60208801611491565b9450604087013593506060870135925060808701356001600160401b03811115611bb357600080fd5b61197289828a016114ad565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1457603f19888603018452611c028583516117fa565b94509285019290850190600101611be6565b5092979650505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611ce657600080fd5b8301803591506001600160401b03821115611d0057600080fd5b6020019150368190038213156110df57600080fd5b600060018201611d3557634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215611d4e57600080fd5b5051919050565b60008251611d678184602087016117d6565b9190910192915050565b6020808252825482820181905260008481528281209092916040850190845b81811015611db55783546001600160a01b031683526001938401939285019201611d90565b50909695505050505050565b634e487b7160e01b600052602160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201614606408bc8ac414e14c9f7bd42da9914d0f1a160fb5ca36339b350f09541764736f6c634300081500330000000000000000000000000576a174d229e3cfa37253523e645a78a0c91b57" 26 | } 27 | ], 28 | "isFixedGasLimit": false 29 | } 30 | ], 31 | "receipts": [], 32 | "libraries": [], 33 | "pending": [ 34 | "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9" 35 | ], 36 | "returns": {}, 37 | "timestamp": 1691877532, 38 | "chain": 5, 39 | "multi": false, 40 | "commit": "10b20ba" 41 | } -------------------------------------------------------------------------------- /contracts/broadcast/WalletFactory.s.sol/5/run-1691877544.json: -------------------------------------------------------------------------------- 1 | { 2 | "transactions": [ 3 | { 4 | "hash": "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9", 5 | "transactionType": "CREATE", 6 | "contractName": "WalletFactory", 7 | "contractAddress": "0xFc38Cf2cD3DA80813a1BF1202f3A02E4b8ceAb21", 8 | "function": null, 9 | "arguments": [ 10 | "0x0576a174D229E3cFA37253523E645A78A0C91B57" 11 | ], 12 | "transaction": { 13 | "type": "0x02", 14 | "from": "0x01573df433484fcbe6325a0c6e051dc62ab107d1", 15 | "gas": "0x2e26ee", 16 | "value": "0x0", 17 | "data": "0x60a060405234801561001057600080fd5b50604051612a91380380612a9183398101604081905261002f91610088565b8060405161003c9061007b565b6001600160a01b039091168152602001604051809103906000f080158015610068573d6000803e3d6000fd5b506001600160a01b0316608052506100b8565b61200280610a8f83390190565b60006020828403121561009a57600080fd5b81516001600160a01b03811681146100b157600080fd5b9392505050565b6080516109b06100df60003960008181604b0152818160fc015261020c01526109b06000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80638117abc11461004657806394f7e8e014610089578063b54c02f21461009c575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006d6100973660046102ec565b6100af565b61006d6100aa3660046102ec565b61019c565b600080836040516024016100c391906103b7565b60408051601f19818403018152918152602080830180516001600160e01b031663a224cee760e01b1790529051919250600091610124917f000000000000000000000000000000000000000000000000000000000000000091859101610428565b6040516020818303038152906040529050600060405180602001610147906102ac565b601f1982820381018352601f90910116604081905261016b9190849060200161046a565b60408051601f198184030181529190528051602082012090915061018f868261026e565b9450505050505b92915050565b6000806101a984846100af565b90506001600160a01b0381163b80156101c457509050610196565b6000856040516024016101d791906103b7565b60408051601f198184030181529181526020820180516001600160e01b031663a224cee760e01b1790525190915060009086907f0000000000000000000000000000000000000000000000000000000000000000908490610237906102ac565b610242929190610428565b8190604051809103906000f5905080158015610262573d6000803e3d6000fd5b50979650505050505050565b600061027b838330610282565b9392505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b6104e1806200049a83390190565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b03811681146102e757600080fd5b919050565b600080604083850312156102ff57600080fd5b823567ffffffffffffffff8082111561031757600080fd5b818501915085601f83011261032b57600080fd5b813560208282111561033f5761033f6102ba565b8160051b604051601f19603f83011681018181108682111715610364576103646102ba565b60405292835281830193508481018201928984111561038257600080fd5b948201945b838610156103a757610398866102d0565b85529482019493820193610387565b9997909101359750505050505050565b6020808252825182820181905260009190848201906040850190845b818110156103f85783516001600160a01b0316835292840192918401916001016103d3565b50909695505050505050565b60005b8381101561041f578181015183820152602001610407565b50506000910152565b60018060a01b03831681526040602082015260008251806040840152610455816060850160208701610404565b601f01601f1916919091016060019392505050565b6000835161047c818460208801610404565b835190830190610490818360208801610404565b0194935050505056fe60806040526040516104e13803806104e1833981016040819052610022916102de565b61002e82826000610035565b50506103fb565b61003e83610061565b60008251118061004b5750805b1561005c5761005a83836100a1565b505b505050565b61006a816100cd565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100c683836040518060600160405280602781526020016104ba60279139610180565b9392505050565b6001600160a01b0381163b61013f5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b03168560405161019d91906103ac565b600060405180830381855af49150503d80600081146101d8576040519150601f19603f3d011682016040523d82523d6000602084013e6101dd565b606091505b5090925090506101ef868383876101f9565b9695505050505050565b60608315610268578251600003610261576001600160a01b0385163b6102615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610136565b5081610272565b610272838361027a565b949350505050565b81511561028a5781518083602001fd5b8060405162461bcd60e51b815260040161013691906103c8565b634e487b7160e01b600052604160045260246000fd5b60005b838110156102d55781810151838201526020016102bd565b50506000910152565b600080604083850312156102f157600080fd5b82516001600160a01b038116811461030857600080fd5b60208401519092506001600160401b038082111561032557600080fd5b818501915085601f83011261033957600080fd5b81518181111561034b5761034b6102a4565b604051601f8201601f19908116603f01168101908382118183101715610373576103736102a4565b8160405282815288602084870101111561038c57600080fd5b61039d8360208301602088016102ba565b80955050505050509250929050565b600082516103be8184602087016102ba565b9190910192915050565b60208152600082518060208401526103e78160408501602087016102ba565b601f01601f19169190910160400192915050565b60b1806104096000396000f3fe608060405236601057600e6013565b005b600e5b601f601b6021565b6058565b565b600060537f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156076573d6000f35b3d6000fdfea26469706673582212203dec9c911290ef373ddf7f0f5f2642676b9f1df249c636bb619bbbda645930d864736f6c63430008150033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f245e7c4bcaec93e6fffaed3093de67658833ba6fa8dd090484f0411d50146e164736f6c6343000815003360c0604052306080523480156200001557600080fd5b506040516200200238038062002002833981016040819052620000389162000117565b6001600160a01b03811660a0526200004f62000056565b5062000149565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000115576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012a57600080fd5b81516001600160a01b03811681146200014257600080fd5b9392505050565b60805160a051611e54620001ae600039600081816102eb015281816106c401528181610a4601528181610ade01528181610c900152610ef4015260008181610464015281816104ad0152818161074c0152818161078c015261081f0152611e546000f3fe60806040526004361061010c5760003560e01c80634f1ef28611610095578063b61d27f611610064578063b61d27f61461030f578063bc197c811461032f578063c399ec881461035e578063d087d28814610373578063f23a6e611461038857600080fd5b80634f1ef2861461029457806352d1902d146102a7578063a224cee7146102bc578063b0d691fe146102dc57600080fd5b80631d06d40d116100dc5780631d06d40d146101f15780633659cfe61461021e5780633a871cdd1461023e57806347e1da2a1461026c5780634a58db191461028c57600080fd5b806223de291461011857806301ffc9a71461013f578063025e7c2714610174578063150b7a02146101ac57600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013d6101333660046114ee565b5050505050505050565b005b34801561014b57600080fd5b5061015f61015a366004611598565b6103b5565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046115c2565b610407565b6040516001600160a01b03909116815260200161016b565b3480156101b857600080fd5b506101d86101c73660046115db565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161016b565b3480156101fd57600080fd5b5061021161020c366004611721565b610431565b60405161016b9190611826565b34801561022a57600080fd5b5061013d610239366004611839565b61045a565b34801561024a57600080fd5b5061025e610259366004611854565b610542565b60405190815260200161016b565b34801561027857600080fd5b5061013d6102873660046118eb565b610568565b61013d6106c2565b61013d6102a2366004611984565b610742565b3480156102b357600080fd5b5061025e610812565b3480156102c857600080fd5b5061013d6102d73660046119d1565b6108c5565b3480156102e857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610194565b34801561031b57600080fd5b5061013d61032a366004611a68565b6109d7565b34801561033b57600080fd5b506101d861034a366004611ac1565b63bc197c8160e01b98975050505050505050565b34801561036a57600080fd5b5061025e610a26565b34801561037f57600080fd5b5061025e610ab7565b34801561039457600080fd5b506101d86103a3366004611b5a565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630a85bd0160e11b14806103e657506001600160e01b03198216630271189760e51b145b8061040157506001600160e01b031982166301ffc9a760e01b145b92915050565b6001818154811061041757600080fd5b6000918252602090912001546001600160a01b0316905081565b6060816040516020016104449190611bbf565b6040516020818303038152906040529050919050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104ab5760405162461bcd60e51b81526004016104a290611c21565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104f4600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b03161461051a5760405162461bcd60e51b81526004016104a290611c6d565b61052381610b0d565b6040805160008082526020820190925261053f91839190610b15565b50565b600061054c610c85565b6105568484610cff565b905061056182610de6565b9392505050565b610570610c85565b8481146105b55760405162461bcd60e51b815260206004820152601360248201527277726f6e67206172726179206c656e6774687360681b60448201526064016104a2565b8281146105fb5760405162461bcd60e51b815260206004820152601460248201527377726f6e672076616c756573206c656e6774687360601b60448201526064016104a2565b60005b858110156106b9576106a787878381811061061b5761061b611cb9565b90506020020160208101906106309190611839565b86868481811061064257610642611cb9565b9050602002013585858581811061065b5761065b611cb9565b905060200281019061066d9190611ccf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b806106b181611d15565b9150506105fe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000060405163b760faf960e01b81523060048201526001600160a01b03919091169063b760faf99034906024016000604051808303818588803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b5050505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361078a5760405162461bcd60e51b81526004016104a290611c21565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107d3600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b81526004016104a290611c6d565b61080282610b0d565b61080e82826001610b15565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104a2565b50600080516020611dd883398151915290565b600054610100900460ff16158080156108e55750600054600160ff909116105b806108ff5750303b1580156108ff575060005460ff166001145b6109625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104a2565b6000805460ff191660011790558015610985576000805461ff0019166101001790555b61098e82610ea3565b801561080e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6109df610c85565b610a20848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa158015610a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190611d3c565b905090565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610a71565b61053f610c85565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610b4d57610b4883610f57565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610ba7575060408051601f3d908101601f19168201909252610ba491810190611d3c565b60015b610c0a5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104a2565b600080516020611dd88339815191528114610c795760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104a2565b50610b48838383610ff3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cfd5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016104a2565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81206000610d3e610140860186611ccf565b810190610d4b9190611721565b905060005b600154811015610dda57610d86828281518110610d6f57610d6f611cb9565b60200260200101518461101890919063ffffffff16565b6001600160a01b031660018281548110610da257610da2611cb9565b6000918252602090912001546001600160a01b031614610dc85760019350505050610401565b80610dd281611d15565b915050610d50565b50600095945050505050565b801561053f57604051600090339060001990849084818181858888f193505050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e61073b565b600080846001600160a01b03168484604051610e4f9190611d55565b60006040518083038185875af1925050503d8060008114610e8c576040519150601f19603f3d011682016040523d82523d6000602084013e610e91565b606091505b50915091508161073b57805160208201fd5b600154610ede5760405162461bcd60e51b81526020600482015260096024820152686e6f206f776e65727360b81b60448201526064016104a2565b8051610ef1906001906020840190611417565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f8afffd56adb385a94a6b7426d4e3f51e2f9de8984c19093c2ddccf8fcfddfe8d6001604051610f4c9190611d71565b60405180910390a250565b6001600160a01b0381163b610fc45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104a2565b600080516020611dd883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b610ffc8361103c565b6000825111806110095750805b15610b4857610a20838361107c565b600080600061102785856110a1565b91509150611034816110e6565b509392505050565b61104581610f57565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606105618383604051806060016040528060278152602001611df860279139611230565b60008082516041036110d75760208301516040840151606085015160001a6110cb878285856112a8565b945094505050506110df565b506000905060025b9250929050565b60008160048111156110fa576110fa611dc1565b036111025750565b600181600481111561111657611116611dc1565b036111635760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a2565b600281600481111561117757611177611dc1565b036111c45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a2565b60038160048111156111d8576111d8611dc1565b0361053f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a2565b6060600080856001600160a01b03168560405161124d9190611d55565b600060405180830381855af49150503d8060008114611288576040519150601f19603f3d011682016040523d82523d6000602084013e61128d565b606091505b509150915061129e8683838761136c565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112df5750600090506003611363565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611333573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661135c57600060019250925050611363565b9150600090505b94509492505050565b606083156113db5782516000036113d4576001600160a01b0385163b6113d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104a2565b50816113e5565b6113e583836113ed565b949350505050565b8151156113fd5781518083602001fd5b8060405162461bcd60e51b81526004016104a29190611826565b82805482825590600052602060002090810192821561146c579160200282015b8281111561146c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611437565b5061147892915061147c565b5090565b5b80821115611478576000815560010161147d565b80356001600160a01b03811681146114a857600080fd5b919050565b60008083601f8401126114bf57600080fd5b5081356001600160401b038111156114d657600080fd5b6020830191508360208285010111156110df57600080fd5b60008060008060008060008060c0898b03121561150a57600080fd5b61151389611491565b975061152160208a01611491565b965061152f60408a01611491565b95506060890135945060808901356001600160401b038082111561155257600080fd5b61155e8c838d016114ad565b909650945060a08b013591508082111561157757600080fd5b506115848b828c016114ad565b999c989b5096995094979396929594505050565b6000602082840312156115aa57600080fd5b81356001600160e01b03198116811461056157600080fd5b6000602082840312156115d457600080fd5b5035919050565b6000806000806000608086880312156115f357600080fd5b6115fc86611491565b945061160a60208701611491565b93506040860135925060608601356001600160401b0381111561162c57600080fd5b611638888289016114ad565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561168757611687611649565b604052919050565b60006001600160401b038211156116a8576116a8611649565b5060051b60200190565b600082601f8301126116c357600080fd5b81356001600160401b038111156116dc576116dc611649565b6116ef601f8201601f191660200161165f565b81815284602083860101111561170457600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561173457600080fd5b82356001600160401b038082111561174b57600080fd5b818501915085601f83011261175f57600080fd5b813561177261176d8261168f565b61165f565b81815260059190911b8301840190848101908883111561179157600080fd5b8585015b838110156117c9578035858111156117ad5760008081fd5b6117bb8b89838a01016116b2565b845250918601918601611795565b5098975050505050505050565b60005b838110156117f15781810151838201526020016117d9565b50506000910152565b600081518084526118128160208601602086016117d6565b601f01601f19169290920160200192915050565b60208152600061056160208301846117fa565b60006020828403121561184b57600080fd5b61056182611491565b60008060006060848603121561186957600080fd5b83356001600160401b0381111561187f57600080fd5b8401610160818703121561189257600080fd5b95602085013595506040909401359392505050565b60008083601f8401126118b957600080fd5b5081356001600160401b038111156118d057600080fd5b6020830191508360208260051b85010111156110df57600080fd5b6000806000806000806060878903121561190457600080fd5b86356001600160401b038082111561191b57600080fd5b6119278a838b016118a7565b9098509650602089013591508082111561194057600080fd5b61194c8a838b016118a7565b9096509450604089013591508082111561196557600080fd5b5061197289828a016118a7565b979a9699509497509295939492505050565b6000806040838503121561199757600080fd5b6119a083611491565b915060208301356001600160401b038111156119bb57600080fd5b6119c7858286016116b2565b9150509250929050565b600060208083850312156119e457600080fd5b82356001600160401b038111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1961176d8261168f565b81815260059190911b82018301908381019087831115611a3857600080fd5b928401925b82841015611a5d57611a4e84611491565b82529284019290840190611a3d565b979650505050505050565b60008060008060608587031215611a7e57600080fd5b611a8785611491565b93506020850135925060408501356001600160401b03811115611aa957600080fd5b611ab5878288016114ad565b95989497509550505050565b60008060008060008060008060a0898b031215611add57600080fd5b611ae689611491565b9750611af460208a01611491565b965060408901356001600160401b0380821115611b1057600080fd5b611b1c8c838d016118a7565b909850965060608b0135915080821115611b3557600080fd5b611b418c838d016118a7565b909650945060808b013591508082111561157757600080fd5b60008060008060008060a08789031215611b7357600080fd5b611b7c87611491565b9550611b8a60208801611491565b9450604087013593506060870135925060808701356001600160401b03811115611bb357600080fd5b61197289828a016114ad565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1457603f19888603018452611c028583516117fa565b94509285019290850190600101611be6565b5092979650505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611ce657600080fd5b8301803591506001600160401b03821115611d0057600080fd5b6020019150368190038213156110df57600080fd5b600060018201611d3557634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215611d4e57600080fd5b5051919050565b60008251611d678184602087016117d6565b9190910192915050565b6020808252825482820181905260008481528281209092916040850190845b81811015611db55783546001600160a01b031683526001938401939285019201611d90565b50909695505050505050565b634e487b7160e01b600052602160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201614606408bc8ac414e14c9f7bd42da9914d0f1a160fb5ca36339b350f09541764736f6c634300081500330000000000000000000000000576a174d229e3cfa37253523e645a78a0c91b57", 18 | "nonce": "0x2a", 19 | "accessList": [] 20 | }, 21 | "additionalContracts": [ 22 | { 23 | "transactionType": "CREATE", 24 | "address": "0x5A6Db894B2bAB1Ee04bE3595dC6bf3790088c4C1", 25 | "initCode": "0x60c0604052306080523480156200001557600080fd5b506040516200200238038062002002833981016040819052620000389162000117565b6001600160a01b03811660a0526200004f62000056565b5062000149565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000115576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012a57600080fd5b81516001600160a01b03811681146200014257600080fd5b9392505050565b60805160a051611e54620001ae600039600081816102eb015281816106c401528181610a4601528181610ade01528181610c900152610ef4015260008181610464015281816104ad0152818161074c0152818161078c015261081f0152611e546000f3fe60806040526004361061010c5760003560e01c80634f1ef28611610095578063b61d27f611610064578063b61d27f61461030f578063bc197c811461032f578063c399ec881461035e578063d087d28814610373578063f23a6e611461038857600080fd5b80634f1ef2861461029457806352d1902d146102a7578063a224cee7146102bc578063b0d691fe146102dc57600080fd5b80631d06d40d116100dc5780631d06d40d146101f15780633659cfe61461021e5780633a871cdd1461023e57806347e1da2a1461026c5780634a58db191461028c57600080fd5b806223de291461011857806301ffc9a71461013f578063025e7c2714610174578063150b7a02146101ac57600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013d6101333660046114ee565b5050505050505050565b005b34801561014b57600080fd5b5061015f61015a366004611598565b6103b5565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046115c2565b610407565b6040516001600160a01b03909116815260200161016b565b3480156101b857600080fd5b506101d86101c73660046115db565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161016b565b3480156101fd57600080fd5b5061021161020c366004611721565b610431565b60405161016b9190611826565b34801561022a57600080fd5b5061013d610239366004611839565b61045a565b34801561024a57600080fd5b5061025e610259366004611854565b610542565b60405190815260200161016b565b34801561027857600080fd5b5061013d6102873660046118eb565b610568565b61013d6106c2565b61013d6102a2366004611984565b610742565b3480156102b357600080fd5b5061025e610812565b3480156102c857600080fd5b5061013d6102d73660046119d1565b6108c5565b3480156102e857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610194565b34801561031b57600080fd5b5061013d61032a366004611a68565b6109d7565b34801561033b57600080fd5b506101d861034a366004611ac1565b63bc197c8160e01b98975050505050505050565b34801561036a57600080fd5b5061025e610a26565b34801561037f57600080fd5b5061025e610ab7565b34801561039457600080fd5b506101d86103a3366004611b5a565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630a85bd0160e11b14806103e657506001600160e01b03198216630271189760e51b145b8061040157506001600160e01b031982166301ffc9a760e01b145b92915050565b6001818154811061041757600080fd5b6000918252602090912001546001600160a01b0316905081565b6060816040516020016104449190611bbf565b6040516020818303038152906040529050919050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104ab5760405162461bcd60e51b81526004016104a290611c21565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104f4600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b03161461051a5760405162461bcd60e51b81526004016104a290611c6d565b61052381610b0d565b6040805160008082526020820190925261053f91839190610b15565b50565b600061054c610c85565b6105568484610cff565b905061056182610de6565b9392505050565b610570610c85565b8481146105b55760405162461bcd60e51b815260206004820152601360248201527277726f6e67206172726179206c656e6774687360681b60448201526064016104a2565b8281146105fb5760405162461bcd60e51b815260206004820152601460248201527377726f6e672076616c756573206c656e6774687360601b60448201526064016104a2565b60005b858110156106b9576106a787878381811061061b5761061b611cb9565b90506020020160208101906106309190611839565b86868481811061064257610642611cb9565b9050602002013585858581811061065b5761065b611cb9565b905060200281019061066d9190611ccf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b806106b181611d15565b9150506105fe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000060405163b760faf960e01b81523060048201526001600160a01b03919091169063b760faf99034906024016000604051808303818588803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b5050505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361078a5760405162461bcd60e51b81526004016104a290611c21565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107d3600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b81526004016104a290611c6d565b61080282610b0d565b61080e82826001610b15565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104a2565b50600080516020611dd883398151915290565b600054610100900460ff16158080156108e55750600054600160ff909116105b806108ff5750303b1580156108ff575060005460ff166001145b6109625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104a2565b6000805460ff191660011790558015610985576000805461ff0019166101001790555b61098e82610ea3565b801561080e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6109df610c85565b610a20848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa158015610a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190611d3c565b905090565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610a71565b61053f610c85565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610b4d57610b4883610f57565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610ba7575060408051601f3d908101601f19168201909252610ba491810190611d3c565b60015b610c0a5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104a2565b600080516020611dd88339815191528114610c795760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104a2565b50610b48838383610ff3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cfd5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016104a2565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81206000610d3e610140860186611ccf565b810190610d4b9190611721565b905060005b600154811015610dda57610d86828281518110610d6f57610d6f611cb9565b60200260200101518461101890919063ffffffff16565b6001600160a01b031660018281548110610da257610da2611cb9565b6000918252602090912001546001600160a01b031614610dc85760019350505050610401565b80610dd281611d15565b915050610d50565b50600095945050505050565b801561053f57604051600090339060001990849084818181858888f193505050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e61073b565b600080846001600160a01b03168484604051610e4f9190611d55565b60006040518083038185875af1925050503d8060008114610e8c576040519150601f19603f3d011682016040523d82523d6000602084013e610e91565b606091505b50915091508161073b57805160208201fd5b600154610ede5760405162461bcd60e51b81526020600482015260096024820152686e6f206f776e65727360b81b60448201526064016104a2565b8051610ef1906001906020840190611417565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f8afffd56adb385a94a6b7426d4e3f51e2f9de8984c19093c2ddccf8fcfddfe8d6001604051610f4c9190611d71565b60405180910390a250565b6001600160a01b0381163b610fc45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104a2565b600080516020611dd883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b610ffc8361103c565b6000825111806110095750805b15610b4857610a20838361107c565b600080600061102785856110a1565b91509150611034816110e6565b509392505050565b61104581610f57565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606105618383604051806060016040528060278152602001611df860279139611230565b60008082516041036110d75760208301516040840151606085015160001a6110cb878285856112a8565b945094505050506110df565b506000905060025b9250929050565b60008160048111156110fa576110fa611dc1565b036111025750565b600181600481111561111657611116611dc1565b036111635760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a2565b600281600481111561117757611177611dc1565b036111c45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a2565b60038160048111156111d8576111d8611dc1565b0361053f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a2565b6060600080856001600160a01b03168560405161124d9190611d55565b600060405180830381855af49150503d8060008114611288576040519150601f19603f3d011682016040523d82523d6000602084013e61128d565b606091505b509150915061129e8683838761136c565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112df5750600090506003611363565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611333573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661135c57600060019250925050611363565b9150600090505b94509492505050565b606083156113db5782516000036113d4576001600160a01b0385163b6113d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104a2565b50816113e5565b6113e583836113ed565b949350505050565b8151156113fd5781518083602001fd5b8060405162461bcd60e51b81526004016104a29190611826565b82805482825590600052602060002090810192821561146c579160200282015b8281111561146c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611437565b5061147892915061147c565b5090565b5b80821115611478576000815560010161147d565b80356001600160a01b03811681146114a857600080fd5b919050565b60008083601f8401126114bf57600080fd5b5081356001600160401b038111156114d657600080fd5b6020830191508360208285010111156110df57600080fd5b60008060008060008060008060c0898b03121561150a57600080fd5b61151389611491565b975061152160208a01611491565b965061152f60408a01611491565b95506060890135945060808901356001600160401b038082111561155257600080fd5b61155e8c838d016114ad565b909650945060a08b013591508082111561157757600080fd5b506115848b828c016114ad565b999c989b5096995094979396929594505050565b6000602082840312156115aa57600080fd5b81356001600160e01b03198116811461056157600080fd5b6000602082840312156115d457600080fd5b5035919050565b6000806000806000608086880312156115f357600080fd5b6115fc86611491565b945061160a60208701611491565b93506040860135925060608601356001600160401b0381111561162c57600080fd5b611638888289016114ad565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561168757611687611649565b604052919050565b60006001600160401b038211156116a8576116a8611649565b5060051b60200190565b600082601f8301126116c357600080fd5b81356001600160401b038111156116dc576116dc611649565b6116ef601f8201601f191660200161165f565b81815284602083860101111561170457600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561173457600080fd5b82356001600160401b038082111561174b57600080fd5b818501915085601f83011261175f57600080fd5b813561177261176d8261168f565b61165f565b81815260059190911b8301840190848101908883111561179157600080fd5b8585015b838110156117c9578035858111156117ad5760008081fd5b6117bb8b89838a01016116b2565b845250918601918601611795565b5098975050505050505050565b60005b838110156117f15781810151838201526020016117d9565b50506000910152565b600081518084526118128160208601602086016117d6565b601f01601f19169290920160200192915050565b60208152600061056160208301846117fa565b60006020828403121561184b57600080fd5b61056182611491565b60008060006060848603121561186957600080fd5b83356001600160401b0381111561187f57600080fd5b8401610160818703121561189257600080fd5b95602085013595506040909401359392505050565b60008083601f8401126118b957600080fd5b5081356001600160401b038111156118d057600080fd5b6020830191508360208260051b85010111156110df57600080fd5b6000806000806000806060878903121561190457600080fd5b86356001600160401b038082111561191b57600080fd5b6119278a838b016118a7565b9098509650602089013591508082111561194057600080fd5b61194c8a838b016118a7565b9096509450604089013591508082111561196557600080fd5b5061197289828a016118a7565b979a9699509497509295939492505050565b6000806040838503121561199757600080fd5b6119a083611491565b915060208301356001600160401b038111156119bb57600080fd5b6119c7858286016116b2565b9150509250929050565b600060208083850312156119e457600080fd5b82356001600160401b038111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1961176d8261168f565b81815260059190911b82018301908381019087831115611a3857600080fd5b928401925b82841015611a5d57611a4e84611491565b82529284019290840190611a3d565b979650505050505050565b60008060008060608587031215611a7e57600080fd5b611a8785611491565b93506020850135925060408501356001600160401b03811115611aa957600080fd5b611ab5878288016114ad565b95989497509550505050565b60008060008060008060008060a0898b031215611add57600080fd5b611ae689611491565b9750611af460208a01611491565b965060408901356001600160401b0380821115611b1057600080fd5b611b1c8c838d016118a7565b909850965060608b0135915080821115611b3557600080fd5b611b418c838d016118a7565b909650945060808b013591508082111561157757600080fd5b60008060008060008060a08789031215611b7357600080fd5b611b7c87611491565b9550611b8a60208801611491565b9450604087013593506060870135925060808701356001600160401b03811115611bb357600080fd5b61197289828a016114ad565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1457603f19888603018452611c028583516117fa565b94509285019290850190600101611be6565b5092979650505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611ce657600080fd5b8301803591506001600160401b03821115611d0057600080fd5b6020019150368190038213156110df57600080fd5b600060018201611d3557634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215611d4e57600080fd5b5051919050565b60008251611d678184602087016117d6565b9190910192915050565b6020808252825482820181905260008481528281209092916040850190845b81811015611db55783546001600160a01b031683526001938401939285019201611d90565b50909695505050505050565b634e487b7160e01b600052602160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201614606408bc8ac414e14c9f7bd42da9914d0f1a160fb5ca36339b350f09541764736f6c634300081500330000000000000000000000000576a174d229e3cfa37253523e645a78a0c91b57" 26 | } 27 | ], 28 | "isFixedGasLimit": false 29 | } 30 | ], 31 | "receipts": [ 32 | { 33 | "transactionHash": "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9", 34 | "transactionIndex": "0x1", 35 | "blockHash": "0xe5ca8248e2656974e7dba824fc163db94e37a8e446f4f5e289ee16699b93e5ce", 36 | "blockNumber": "0x911299", 37 | "from": "0x01573Df433484fCBe6325a0c6E051Dc62Ab107D1", 38 | "to": null, 39 | "cumulativeGasUsed": "0x240ef6", 40 | "gasUsed": "0x238519", 41 | "contractAddress": "0xFc38Cf2cD3DA80813a1BF1202f3A02E4b8ceAb21", 42 | "logs": [ 43 | { 44 | "address": "0x5A6Db894B2bAB1Ee04bE3595dC6bf3790088c4C1", 45 | "topics": [ 46 | "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" 47 | ], 48 | "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", 49 | "blockHash": "0xe5ca8248e2656974e7dba824fc163db94e37a8e446f4f5e289ee16699b93e5ce", 50 | "blockNumber": "0x911299", 51 | "transactionHash": "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9", 52 | "transactionIndex": "0x1", 53 | "logIndex": "0x1", 54 | "removed": false 55 | } 56 | ], 57 | "status": "0x1", 58 | "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000002000000000000000800000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 59 | "type": "0x2", 60 | "effectiveGasPrice": "0xb2d05e18" 61 | } 62 | ], 63 | "libraries": [], 64 | "pending": [], 65 | "returns": {}, 66 | "timestamp": 1691877544, 67 | "chain": 5, 68 | "multi": false, 69 | "commit": "10b20ba" 70 | } -------------------------------------------------------------------------------- /contracts/broadcast/WalletFactory.s.sol/5/run-1691877571.json: -------------------------------------------------------------------------------- 1 | { 2 | "transactions": [ 3 | { 4 | "hash": "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9", 5 | "transactionType": "CREATE", 6 | "contractName": "WalletFactory", 7 | "contractAddress": "0xFc38Cf2cD3DA80813a1BF1202f3A02E4b8ceAb21", 8 | "function": null, 9 | "arguments": [ 10 | "0x0576a174D229E3cFA37253523E645A78A0C91B57" 11 | ], 12 | "transaction": { 13 | "type": "0x02", 14 | "from": "0x01573df433484fcbe6325a0c6e051dc62ab107d1", 15 | "gas": "0x2e26ee", 16 | "value": "0x0", 17 | "data": "0x60a060405234801561001057600080fd5b50604051612a91380380612a9183398101604081905261002f91610088565b8060405161003c9061007b565b6001600160a01b039091168152602001604051809103906000f080158015610068573d6000803e3d6000fd5b506001600160a01b0316608052506100b8565b61200280610a8f83390190565b60006020828403121561009a57600080fd5b81516001600160a01b03811681146100b157600080fd5b9392505050565b6080516109b06100df60003960008181604b0152818160fc015261020c01526109b06000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80638117abc11461004657806394f7e8e014610089578063b54c02f21461009c575b600080fd5b61006d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200160405180910390f35b61006d6100973660046102ec565b6100af565b61006d6100aa3660046102ec565b61019c565b600080836040516024016100c391906103b7565b60408051601f19818403018152918152602080830180516001600160e01b031663a224cee760e01b1790529051919250600091610124917f000000000000000000000000000000000000000000000000000000000000000091859101610428565b6040516020818303038152906040529050600060405180602001610147906102ac565b601f1982820381018352601f90910116604081905261016b9190849060200161046a565b60408051601f198184030181529190528051602082012090915061018f868261026e565b9450505050505b92915050565b6000806101a984846100af565b90506001600160a01b0381163b80156101c457509050610196565b6000856040516024016101d791906103b7565b60408051601f198184030181529181526020820180516001600160e01b031663a224cee760e01b1790525190915060009086907f0000000000000000000000000000000000000000000000000000000000000000908490610237906102ac565b610242929190610428565b8190604051809103906000f5905080158015610262573d6000803e3d6000fd5b50979650505050505050565b600061027b838330610282565b9392505050565b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b6104e1806200049a83390190565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b03811681146102e757600080fd5b919050565b600080604083850312156102ff57600080fd5b823567ffffffffffffffff8082111561031757600080fd5b818501915085601f83011261032b57600080fd5b813560208282111561033f5761033f6102ba565b8160051b604051601f19603f83011681018181108682111715610364576103646102ba565b60405292835281830193508481018201928984111561038257600080fd5b948201945b838610156103a757610398866102d0565b85529482019493820193610387565b9997909101359750505050505050565b6020808252825182820181905260009190848201906040850190845b818110156103f85783516001600160a01b0316835292840192918401916001016103d3565b50909695505050505050565b60005b8381101561041f578181015183820152602001610407565b50506000910152565b60018060a01b03831681526040602082015260008251806040840152610455816060850160208701610404565b601f01601f1916919091016060019392505050565b6000835161047c818460208801610404565b835190830190610490818360208801610404565b0194935050505056fe60806040526040516104e13803806104e1833981016040819052610022916102de565b61002e82826000610035565b50506103fb565b61003e83610061565b60008251118061004b5750805b1561005c5761005a83836100a1565b505b505050565b61006a816100cd565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100c683836040518060600160405280602781526020016104ba60279139610180565b9392505050565b6001600160a01b0381163b61013f5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080856001600160a01b03168560405161019d91906103ac565b600060405180830381855af49150503d80600081146101d8576040519150601f19603f3d011682016040523d82523d6000602084013e6101dd565b606091505b5090925090506101ef868383876101f9565b9695505050505050565b60608315610268578251600003610261576001600160a01b0385163b6102615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610136565b5081610272565b610272838361027a565b949350505050565b81511561028a5781518083602001fd5b8060405162461bcd60e51b815260040161013691906103c8565b634e487b7160e01b600052604160045260246000fd5b60005b838110156102d55781810151838201526020016102bd565b50506000910152565b600080604083850312156102f157600080fd5b82516001600160a01b038116811461030857600080fd5b60208401519092506001600160401b038082111561032557600080fd5b818501915085601f83011261033957600080fd5b81518181111561034b5761034b6102a4565b604051601f8201601f19908116603f01168101908382118183101715610373576103736102a4565b8160405282815288602084870101111561038c57600080fd5b61039d8360208301602088016102ba565b80955050505050509250929050565b600082516103be8184602087016102ba565b9190910192915050565b60208152600082518060208401526103e78160408501602087016102ba565b601f01601f19169190910160400192915050565b60b1806104096000396000f3fe608060405236601057600e6013565b005b600e5b601f601b6021565b6058565b565b600060537f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156076573d6000f35b3d6000fdfea26469706673582212203dec9c911290ef373ddf7f0f5f2642676b9f1df249c636bb619bbbda645930d864736f6c63430008150033416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220f245e7c4bcaec93e6fffaed3093de67658833ba6fa8dd090484f0411d50146e164736f6c6343000815003360c0604052306080523480156200001557600080fd5b506040516200200238038062002002833981016040819052620000389162000117565b6001600160a01b03811660a0526200004f62000056565b5062000149565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000115576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012a57600080fd5b81516001600160a01b03811681146200014257600080fd5b9392505050565b60805160a051611e54620001ae600039600081816102eb015281816106c401528181610a4601528181610ade01528181610c900152610ef4015260008181610464015281816104ad0152818161074c0152818161078c015261081f0152611e546000f3fe60806040526004361061010c5760003560e01c80634f1ef28611610095578063b61d27f611610064578063b61d27f61461030f578063bc197c811461032f578063c399ec881461035e578063d087d28814610373578063f23a6e611461038857600080fd5b80634f1ef2861461029457806352d1902d146102a7578063a224cee7146102bc578063b0d691fe146102dc57600080fd5b80631d06d40d116100dc5780631d06d40d146101f15780633659cfe61461021e5780633a871cdd1461023e57806347e1da2a1461026c5780634a58db191461028c57600080fd5b806223de291461011857806301ffc9a71461013f578063025e7c2714610174578063150b7a02146101ac57600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013d6101333660046114ee565b5050505050505050565b005b34801561014b57600080fd5b5061015f61015a366004611598565b6103b5565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046115c2565b610407565b6040516001600160a01b03909116815260200161016b565b3480156101b857600080fd5b506101d86101c73660046115db565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161016b565b3480156101fd57600080fd5b5061021161020c366004611721565b610431565b60405161016b9190611826565b34801561022a57600080fd5b5061013d610239366004611839565b61045a565b34801561024a57600080fd5b5061025e610259366004611854565b610542565b60405190815260200161016b565b34801561027857600080fd5b5061013d6102873660046118eb565b610568565b61013d6106c2565b61013d6102a2366004611984565b610742565b3480156102b357600080fd5b5061025e610812565b3480156102c857600080fd5b5061013d6102d73660046119d1565b6108c5565b3480156102e857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610194565b34801561031b57600080fd5b5061013d61032a366004611a68565b6109d7565b34801561033b57600080fd5b506101d861034a366004611ac1565b63bc197c8160e01b98975050505050505050565b34801561036a57600080fd5b5061025e610a26565b34801561037f57600080fd5b5061025e610ab7565b34801561039457600080fd5b506101d86103a3366004611b5a565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630a85bd0160e11b14806103e657506001600160e01b03198216630271189760e51b145b8061040157506001600160e01b031982166301ffc9a760e01b145b92915050565b6001818154811061041757600080fd5b6000918252602090912001546001600160a01b0316905081565b6060816040516020016104449190611bbf565b6040516020818303038152906040529050919050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104ab5760405162461bcd60e51b81526004016104a290611c21565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104f4600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b03161461051a5760405162461bcd60e51b81526004016104a290611c6d565b61052381610b0d565b6040805160008082526020820190925261053f91839190610b15565b50565b600061054c610c85565b6105568484610cff565b905061056182610de6565b9392505050565b610570610c85565b8481146105b55760405162461bcd60e51b815260206004820152601360248201527277726f6e67206172726179206c656e6774687360681b60448201526064016104a2565b8281146105fb5760405162461bcd60e51b815260206004820152601460248201527377726f6e672076616c756573206c656e6774687360601b60448201526064016104a2565b60005b858110156106b9576106a787878381811061061b5761061b611cb9565b90506020020160208101906106309190611839565b86868481811061064257610642611cb9565b9050602002013585858581811061065b5761065b611cb9565b905060200281019061066d9190611ccf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b806106b181611d15565b9150506105fe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000060405163b760faf960e01b81523060048201526001600160a01b03919091169063b760faf99034906024016000604051808303818588803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b5050505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361078a5760405162461bcd60e51b81526004016104a290611c21565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107d3600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b81526004016104a290611c6d565b61080282610b0d565b61080e82826001610b15565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104a2565b50600080516020611dd883398151915290565b600054610100900460ff16158080156108e55750600054600160ff909116105b806108ff5750303b1580156108ff575060005460ff166001145b6109625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104a2565b6000805460ff191660011790558015610985576000805461ff0019166101001790555b61098e82610ea3565b801561080e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6109df610c85565b610a20848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa158015610a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190611d3c565b905090565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610a71565b61053f610c85565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610b4d57610b4883610f57565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610ba7575060408051601f3d908101601f19168201909252610ba491810190611d3c565b60015b610c0a5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104a2565b600080516020611dd88339815191528114610c795760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104a2565b50610b48838383610ff3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cfd5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016104a2565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81206000610d3e610140860186611ccf565b810190610d4b9190611721565b905060005b600154811015610dda57610d86828281518110610d6f57610d6f611cb9565b60200260200101518461101890919063ffffffff16565b6001600160a01b031660018281548110610da257610da2611cb9565b6000918252602090912001546001600160a01b031614610dc85760019350505050610401565b80610dd281611d15565b915050610d50565b50600095945050505050565b801561053f57604051600090339060001990849084818181858888f193505050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e61073b565b600080846001600160a01b03168484604051610e4f9190611d55565b60006040518083038185875af1925050503d8060008114610e8c576040519150601f19603f3d011682016040523d82523d6000602084013e610e91565b606091505b50915091508161073b57805160208201fd5b600154610ede5760405162461bcd60e51b81526020600482015260096024820152686e6f206f776e65727360b81b60448201526064016104a2565b8051610ef1906001906020840190611417565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f8afffd56adb385a94a6b7426d4e3f51e2f9de8984c19093c2ddccf8fcfddfe8d6001604051610f4c9190611d71565b60405180910390a250565b6001600160a01b0381163b610fc45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104a2565b600080516020611dd883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b610ffc8361103c565b6000825111806110095750805b15610b4857610a20838361107c565b600080600061102785856110a1565b91509150611034816110e6565b509392505050565b61104581610f57565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606105618383604051806060016040528060278152602001611df860279139611230565b60008082516041036110d75760208301516040840151606085015160001a6110cb878285856112a8565b945094505050506110df565b506000905060025b9250929050565b60008160048111156110fa576110fa611dc1565b036111025750565b600181600481111561111657611116611dc1565b036111635760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a2565b600281600481111561117757611177611dc1565b036111c45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a2565b60038160048111156111d8576111d8611dc1565b0361053f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a2565b6060600080856001600160a01b03168560405161124d9190611d55565b600060405180830381855af49150503d8060008114611288576040519150601f19603f3d011682016040523d82523d6000602084013e61128d565b606091505b509150915061129e8683838761136c565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112df5750600090506003611363565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611333573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661135c57600060019250925050611363565b9150600090505b94509492505050565b606083156113db5782516000036113d4576001600160a01b0385163b6113d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104a2565b50816113e5565b6113e583836113ed565b949350505050565b8151156113fd5781518083602001fd5b8060405162461bcd60e51b81526004016104a29190611826565b82805482825590600052602060002090810192821561146c579160200282015b8281111561146c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611437565b5061147892915061147c565b5090565b5b80821115611478576000815560010161147d565b80356001600160a01b03811681146114a857600080fd5b919050565b60008083601f8401126114bf57600080fd5b5081356001600160401b038111156114d657600080fd5b6020830191508360208285010111156110df57600080fd5b60008060008060008060008060c0898b03121561150a57600080fd5b61151389611491565b975061152160208a01611491565b965061152f60408a01611491565b95506060890135945060808901356001600160401b038082111561155257600080fd5b61155e8c838d016114ad565b909650945060a08b013591508082111561157757600080fd5b506115848b828c016114ad565b999c989b5096995094979396929594505050565b6000602082840312156115aa57600080fd5b81356001600160e01b03198116811461056157600080fd5b6000602082840312156115d457600080fd5b5035919050565b6000806000806000608086880312156115f357600080fd5b6115fc86611491565b945061160a60208701611491565b93506040860135925060608601356001600160401b0381111561162c57600080fd5b611638888289016114ad565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561168757611687611649565b604052919050565b60006001600160401b038211156116a8576116a8611649565b5060051b60200190565b600082601f8301126116c357600080fd5b81356001600160401b038111156116dc576116dc611649565b6116ef601f8201601f191660200161165f565b81815284602083860101111561170457600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561173457600080fd5b82356001600160401b038082111561174b57600080fd5b818501915085601f83011261175f57600080fd5b813561177261176d8261168f565b61165f565b81815260059190911b8301840190848101908883111561179157600080fd5b8585015b838110156117c9578035858111156117ad5760008081fd5b6117bb8b89838a01016116b2565b845250918601918601611795565b5098975050505050505050565b60005b838110156117f15781810151838201526020016117d9565b50506000910152565b600081518084526118128160208601602086016117d6565b601f01601f19169290920160200192915050565b60208152600061056160208301846117fa565b60006020828403121561184b57600080fd5b61056182611491565b60008060006060848603121561186957600080fd5b83356001600160401b0381111561187f57600080fd5b8401610160818703121561189257600080fd5b95602085013595506040909401359392505050565b60008083601f8401126118b957600080fd5b5081356001600160401b038111156118d057600080fd5b6020830191508360208260051b85010111156110df57600080fd5b6000806000806000806060878903121561190457600080fd5b86356001600160401b038082111561191b57600080fd5b6119278a838b016118a7565b9098509650602089013591508082111561194057600080fd5b61194c8a838b016118a7565b9096509450604089013591508082111561196557600080fd5b5061197289828a016118a7565b979a9699509497509295939492505050565b6000806040838503121561199757600080fd5b6119a083611491565b915060208301356001600160401b038111156119bb57600080fd5b6119c7858286016116b2565b9150509250929050565b600060208083850312156119e457600080fd5b82356001600160401b038111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1961176d8261168f565b81815260059190911b82018301908381019087831115611a3857600080fd5b928401925b82841015611a5d57611a4e84611491565b82529284019290840190611a3d565b979650505050505050565b60008060008060608587031215611a7e57600080fd5b611a8785611491565b93506020850135925060408501356001600160401b03811115611aa957600080fd5b611ab5878288016114ad565b95989497509550505050565b60008060008060008060008060a0898b031215611add57600080fd5b611ae689611491565b9750611af460208a01611491565b965060408901356001600160401b0380821115611b1057600080fd5b611b1c8c838d016118a7565b909850965060608b0135915080821115611b3557600080fd5b611b418c838d016118a7565b909650945060808b013591508082111561157757600080fd5b60008060008060008060a08789031215611b7357600080fd5b611b7c87611491565b9550611b8a60208801611491565b9450604087013593506060870135925060808701356001600160401b03811115611bb357600080fd5b61197289828a016114ad565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1457603f19888603018452611c028583516117fa565b94509285019290850190600101611be6565b5092979650505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611ce657600080fd5b8301803591506001600160401b03821115611d0057600080fd5b6020019150368190038213156110df57600080fd5b600060018201611d3557634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215611d4e57600080fd5b5051919050565b60008251611d678184602087016117d6565b9190910192915050565b6020808252825482820181905260008481528281209092916040850190845b81811015611db55783546001600160a01b031683526001938401939285019201611d90565b50909695505050505050565b634e487b7160e01b600052602160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201614606408bc8ac414e14c9f7bd42da9914d0f1a160fb5ca36339b350f09541764736f6c634300081500330000000000000000000000000576a174d229e3cfa37253523e645a78a0c91b57", 18 | "nonce": "0x2a", 19 | "accessList": [] 20 | }, 21 | "additionalContracts": [ 22 | { 23 | "transactionType": "CREATE", 24 | "address": "0x5A6Db894B2bAB1Ee04bE3595dC6bf3790088c4C1", 25 | "initCode": "0x60c0604052306080523480156200001557600080fd5b506040516200200238038062002002833981016040819052620000389162000117565b6001600160a01b03811660a0526200004f62000056565b5062000149565b600054610100900460ff1615620000c35760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161462000115576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6000602082840312156200012a57600080fd5b81516001600160a01b03811681146200014257600080fd5b9392505050565b60805160a051611e54620001ae600039600081816102eb015281816106c401528181610a4601528181610ade01528181610c900152610ef4015260008181610464015281816104ad0152818161074c0152818161078c015261081f0152611e546000f3fe60806040526004361061010c5760003560e01c80634f1ef28611610095578063b61d27f611610064578063b61d27f61461030f578063bc197c811461032f578063c399ec881461035e578063d087d28814610373578063f23a6e611461038857600080fd5b80634f1ef2861461029457806352d1902d146102a7578063a224cee7146102bc578063b0d691fe146102dc57600080fd5b80631d06d40d116100dc5780631d06d40d146101f15780633659cfe61461021e5780633a871cdd1461023e57806347e1da2a1461026c5780634a58db191461028c57600080fd5b806223de291461011857806301ffc9a71461013f578063025e7c2714610174578063150b7a02146101ac57600080fd5b3661011357005b600080fd5b34801561012457600080fd5b5061013d6101333660046114ee565b5050505050505050565b005b34801561014b57600080fd5b5061015f61015a366004611598565b6103b5565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061019461018f3660046115c2565b610407565b6040516001600160a01b03909116815260200161016b565b3480156101b857600080fd5b506101d86101c73660046115db565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161016b565b3480156101fd57600080fd5b5061021161020c366004611721565b610431565b60405161016b9190611826565b34801561022a57600080fd5b5061013d610239366004611839565b61045a565b34801561024a57600080fd5b5061025e610259366004611854565b610542565b60405190815260200161016b565b34801561027857600080fd5b5061013d6102873660046118eb565b610568565b61013d6106c2565b61013d6102a2366004611984565b610742565b3480156102b357600080fd5b5061025e610812565b3480156102c857600080fd5b5061013d6102d73660046119d1565b6108c5565b3480156102e857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610194565b34801561031b57600080fd5b5061013d61032a366004611a68565b6109d7565b34801561033b57600080fd5b506101d861034a366004611ac1565b63bc197c8160e01b98975050505050505050565b34801561036a57600080fd5b5061025e610a26565b34801561037f57600080fd5b5061025e610ab7565b34801561039457600080fd5b506101d86103a3366004611b5a565b63f23a6e6160e01b9695505050505050565b60006001600160e01b03198216630a85bd0160e11b14806103e657506001600160e01b03198216630271189760e51b145b8061040157506001600160e01b031982166301ffc9a760e01b145b92915050565b6001818154811061041757600080fd5b6000918252602090912001546001600160a01b0316905081565b6060816040516020016104449190611bbf565b6040516020818303038152906040529050919050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104ab5760405162461bcd60e51b81526004016104a290611c21565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166104f4600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b03161461051a5760405162461bcd60e51b81526004016104a290611c6d565b61052381610b0d565b6040805160008082526020820190925261053f91839190610b15565b50565b600061054c610c85565b6105568484610cff565b905061056182610de6565b9392505050565b610570610c85565b8481146105b55760405162461bcd60e51b815260206004820152601360248201527277726f6e67206172726179206c656e6774687360681b60448201526064016104a2565b8281146105fb5760405162461bcd60e51b815260206004820152601460248201527377726f6e672076616c756573206c656e6774687360601b60448201526064016104a2565b60005b858110156106b9576106a787878381811061061b5761061b611cb9565b90506020020160208101906106309190611839565b86868481811061064257610642611cb9565b9050602002013585858581811061065b5761065b611cb9565b905060200281019061066d9190611ccf565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b806106b181611d15565b9150506105fe565b50505050505050565b7f000000000000000000000000000000000000000000000000000000000000000060405163b760faf960e01b81523060048201526001600160a01b03919091169063b760faf99034906024016000604051808303818588803b15801561072757600080fd5b505af115801561073b573d6000803e3d6000fd5b5050505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361078a5760405162461bcd60e51b81526004016104a290611c21565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166107d3600080516020611dd8833981519152546001600160a01b031690565b6001600160a01b0316146107f95760405162461bcd60e51b81526004016104a290611c6d565b61080282610b0d565b61080e82826001610b15565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146108b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016104a2565b50600080516020611dd883398151915290565b600054610100900460ff16158080156108e55750600054600160ff909116105b806108ff5750303b1580156108ff575060005460ff166001145b6109625760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104a2565b6000805460ff191660011790558015610985576000805461ff0019166101001790555b61098e82610ea3565b801561080e576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6109df610c85565b610a20848484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e3392505050565b50505050565b6040516370a0823160e01b81523060048201526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a08231906024015b602060405180830381865afa158015610a8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab29190611d3c565b905090565b604051631aab3f0d60e11b8152306004820152600060248201819052906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906335567e1a90604401610a71565b61053f610c85565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610b4d57610b4883610f57565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610ba7575060408051601f3d908101601f19168201909252610ba491810190611d3c565b60015b610c0a5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016104a2565b600080516020611dd88339815191528114610c795760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016104a2565b50610b48838383610ff3565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cfd5760405162461bcd60e51b815260206004820152601c60248201527f6163636f756e743a206e6f742066726f6d20456e747279506f696e740000000060448201526064016104a2565b565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c829052603c81206000610d3e610140860186611ccf565b810190610d4b9190611721565b905060005b600154811015610dda57610d86828281518110610d6f57610d6f611cb9565b60200260200101518461101890919063ffffffff16565b6001600160a01b031660018281548110610da257610da2611cb9565b6000918252602090912001546001600160a01b031614610dc85760019350505050610401565b80610dd281611d15565b915050610d50565b50600095945050505050565b801561053f57604051600090339060001990849084818181858888f193505050503d806000811461073b576040519150601f19603f3d011682016040523d82523d6000602084013e61073b565b600080846001600160a01b03168484604051610e4f9190611d55565b60006040518083038185875af1925050503d8060008114610e8c576040519150601f19603f3d011682016040523d82523d6000602084013e610e91565b606091505b50915091508161073b57805160208201fd5b600154610ede5760405162461bcd60e51b81526020600482015260096024820152686e6f206f776e65727360b81b60448201526064016104a2565b8051610ef1906001906020840190611417565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f8afffd56adb385a94a6b7426d4e3f51e2f9de8984c19093c2ddccf8fcfddfe8d6001604051610f4c9190611d71565b60405180910390a250565b6001600160a01b0381163b610fc45760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016104a2565b600080516020611dd883398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b610ffc8361103c565b6000825111806110095750805b15610b4857610a20838361107c565b600080600061102785856110a1565b91509150611034816110e6565b509392505050565b61104581610f57565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606105618383604051806060016040528060278152602001611df860279139611230565b60008082516041036110d75760208301516040840151606085015160001a6110cb878285856112a8565b945094505050506110df565b506000905060025b9250929050565b60008160048111156110fa576110fa611dc1565b036111025750565b600181600481111561111657611116611dc1565b036111635760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a2565b600281600481111561117757611177611dc1565b036111c45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a2565b60038160048111156111d8576111d8611dc1565b0361053f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a2565b6060600080856001600160a01b03168560405161124d9190611d55565b600060405180830381855af49150503d8060008114611288576040519150601f19603f3d011682016040523d82523d6000602084013e61128d565b606091505b509150915061129e8683838761136c565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112df5750600090506003611363565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611333573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661135c57600060019250925050611363565b9150600090505b94509492505050565b606083156113db5782516000036113d4576001600160a01b0385163b6113d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104a2565b50816113e5565b6113e583836113ed565b949350505050565b8151156113fd5781518083602001fd5b8060405162461bcd60e51b81526004016104a29190611826565b82805482825590600052602060002090810192821561146c579160200282015b8281111561146c57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611437565b5061147892915061147c565b5090565b5b80821115611478576000815560010161147d565b80356001600160a01b03811681146114a857600080fd5b919050565b60008083601f8401126114bf57600080fd5b5081356001600160401b038111156114d657600080fd5b6020830191508360208285010111156110df57600080fd5b60008060008060008060008060c0898b03121561150a57600080fd5b61151389611491565b975061152160208a01611491565b965061152f60408a01611491565b95506060890135945060808901356001600160401b038082111561155257600080fd5b61155e8c838d016114ad565b909650945060a08b013591508082111561157757600080fd5b506115848b828c016114ad565b999c989b5096995094979396929594505050565b6000602082840312156115aa57600080fd5b81356001600160e01b03198116811461056157600080fd5b6000602082840312156115d457600080fd5b5035919050565b6000806000806000608086880312156115f357600080fd5b6115fc86611491565b945061160a60208701611491565b93506040860135925060608601356001600160401b0381111561162c57600080fd5b611638888289016114ad565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561168757611687611649565b604052919050565b60006001600160401b038211156116a8576116a8611649565b5060051b60200190565b600082601f8301126116c357600080fd5b81356001600160401b038111156116dc576116dc611649565b6116ef601f8201601f191660200161165f565b81815284602083860101111561170457600080fd5b816020850160208301376000918101602001919091529392505050565b6000602080838503121561173457600080fd5b82356001600160401b038082111561174b57600080fd5b818501915085601f83011261175f57600080fd5b813561177261176d8261168f565b61165f565b81815260059190911b8301840190848101908883111561179157600080fd5b8585015b838110156117c9578035858111156117ad5760008081fd5b6117bb8b89838a01016116b2565b845250918601918601611795565b5098975050505050505050565b60005b838110156117f15781810151838201526020016117d9565b50506000910152565b600081518084526118128160208601602086016117d6565b601f01601f19169290920160200192915050565b60208152600061056160208301846117fa565b60006020828403121561184b57600080fd5b61056182611491565b60008060006060848603121561186957600080fd5b83356001600160401b0381111561187f57600080fd5b8401610160818703121561189257600080fd5b95602085013595506040909401359392505050565b60008083601f8401126118b957600080fd5b5081356001600160401b038111156118d057600080fd5b6020830191508360208260051b85010111156110df57600080fd5b6000806000806000806060878903121561190457600080fd5b86356001600160401b038082111561191b57600080fd5b6119278a838b016118a7565b9098509650602089013591508082111561194057600080fd5b61194c8a838b016118a7565b9096509450604089013591508082111561196557600080fd5b5061197289828a016118a7565b979a9699509497509295939492505050565b6000806040838503121561199757600080fd5b6119a083611491565b915060208301356001600160401b038111156119bb57600080fd5b6119c7858286016116b2565b9150509250929050565b600060208083850312156119e457600080fd5b82356001600160401b038111156119fa57600080fd5b8301601f81018513611a0b57600080fd5b8035611a1961176d8261168f565b81815260059190911b82018301908381019087831115611a3857600080fd5b928401925b82841015611a5d57611a4e84611491565b82529284019290840190611a3d565b979650505050505050565b60008060008060608587031215611a7e57600080fd5b611a8785611491565b93506020850135925060408501356001600160401b03811115611aa957600080fd5b611ab5878288016114ad565b95989497509550505050565b60008060008060008060008060a0898b031215611add57600080fd5b611ae689611491565b9750611af460208a01611491565b965060408901356001600160401b0380821115611b1057600080fd5b611b1c8c838d016118a7565b909850965060608b0135915080821115611b3557600080fd5b611b418c838d016118a7565b909650945060808b013591508082111561157757600080fd5b60008060008060008060a08789031215611b7357600080fd5b611b7c87611491565b9550611b8a60208801611491565b9450604087013593506060870135925060808701356001600160401b03811115611bb357600080fd5b61197289828a016114ad565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611c1457603f19888603018452611c028583516117fa565b94509285019290850190600101611be6565b5092979650505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112611ce657600080fd5b8301803591506001600160401b03821115611d0057600080fd5b6020019150368190038213156110df57600080fd5b600060018201611d3557634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215611d4e57600080fd5b5051919050565b60008251611d678184602087016117d6565b9190910192915050565b6020808252825482820181905260008481528281209092916040850190845b81811015611db55783546001600160a01b031683526001938401939285019201611d90565b50909695505050505050565b634e487b7160e01b600052602160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212201614606408bc8ac414e14c9f7bd42da9914d0f1a160fb5ca36339b350f09541764736f6c634300081500330000000000000000000000000576a174d229e3cfa37253523e645a78a0c91b57" 26 | } 27 | ], 28 | "isFixedGasLimit": false 29 | } 30 | ], 31 | "receipts": [ 32 | { 33 | "transactionHash": "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9", 34 | "transactionIndex": "0x1", 35 | "blockHash": "0xe5ca8248e2656974e7dba824fc163db94e37a8e446f4f5e289ee16699b93e5ce", 36 | "blockNumber": "0x911299", 37 | "from": "0x01573Df433484fCBe6325a0c6E051Dc62Ab107D1", 38 | "to": null, 39 | "cumulativeGasUsed": "0x240ef6", 40 | "gasUsed": "0x238519", 41 | "contractAddress": "0xFc38Cf2cD3DA80813a1BF1202f3A02E4b8ceAb21", 42 | "logs": [ 43 | { 44 | "address": "0x5A6Db894B2bAB1Ee04bE3595dC6bf3790088c4C1", 45 | "topics": [ 46 | "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" 47 | ], 48 | "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", 49 | "blockHash": "0xe5ca8248e2656974e7dba824fc163db94e37a8e446f4f5e289ee16699b93e5ce", 50 | "blockNumber": "0x911299", 51 | "transactionHash": "0x7c49bf97a782b50fdfc7b0cb4e7e12f7fab9e947d1ae38a4ae60dc2ef20e5ee9", 52 | "transactionIndex": "0x1", 53 | "logIndex": "0x1", 54 | "removed": false 55 | } 56 | ], 57 | "status": "0x1", 58 | "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000002000000000000000800000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 59 | "type": "0x2", 60 | "effectiveGasPrice": "0xb2d05e18" 61 | } 62 | ], 63 | "libraries": [], 64 | "pending": [], 65 | "returns": {}, 66 | "timestamp": 1691877571, 67 | "chain": 5, 68 | "multi": false, 69 | "commit": "10b20ba" 70 | } -------------------------------------------------------------------------------- /contracts/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["lib"] 5 | 6 | [rpc_endpoints] 7 | goerli = "${GOERLI_RPC_URL}" 8 | 9 | [etherscan] 10 | goerli = { key = "${ETHERSCAN_API_KEY}" } 11 | # See more config options https://github.com/foundry-rs/foundry/tree/master/config 12 | -------------------------------------------------------------------------------- /contracts/remappings.txt: -------------------------------------------------------------------------------- 1 | account-abstraction/=lib/account-abstraction/contracts/ 2 | ds-test/=lib/forge-std/lib/ds-test/src/ 3 | erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/ 4 | forge-std/=lib/forge-std/src/ 5 | openzeppelin-contracts/=lib/openzeppelin-contracts/ 6 | openzeppelin/=lib/openzeppelin-contracts/contracts/ 7 | @openzeppelin/=lib/openzeppelin-contracts/ -------------------------------------------------------------------------------- /contracts/script/Counter.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import {Script, console2} from "forge-std/Script.sol"; 5 | 6 | contract CounterScript is Script { 7 | function setUp() public {} 8 | 9 | function run() public { 10 | vm.broadcast(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /contracts/script/WalletFactory.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity ^0.8.12; 3 | 4 | import "forge-std/Script.sol"; 5 | import "../src/WalletFactory.sol"; 6 | import {IEntryPoint} from "account-abstraction/interfaces/IEntryPoint.sol"; 7 | 8 | contract WalletFactoryScript is Script { 9 | IEntryPoint constant ENTRYPOINT = 10 | IEntryPoint(0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789); 11 | 12 | function run() external { 13 | uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); 14 | vm.startBroadcast(deployerPrivateKey); 15 | 16 | WalletFactory walletFactory = new WalletFactory(ENTRYPOINT); 17 | 18 | vm.stopBroadcast(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /contracts/src/Wallet.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity ^0.8.12; 3 | 4 | import {BaseAccount} from "account-abstraction/core/BaseAccount.sol"; 5 | import {IEntryPoint} from "account-abstraction/interfaces/IEntryPoint.sol"; 6 | import {UserOperation} from "account-abstraction/interfaces/UserOperation.sol"; 7 | import {TokenCallbackHandler} from "account-abstraction/samples/callback/TokenCallbackHandler.sol"; 8 | import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; 9 | import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; 10 | import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; 11 | 12 | contract Wallet is 13 | BaseAccount, 14 | TokenCallbackHandler, 15 | Initializable, 16 | UUPSUpgradeable 17 | { 18 | using ECDSA for bytes32; 19 | 20 | address public immutable walletFactory; 21 | IEntryPoint private immutable _entryPoint; 22 | address[] public owners; 23 | 24 | event WalletInitialized(IEntryPoint indexed entryPoint, address[] owners); 25 | 26 | modifier _requireFromEntryPointOrFactory() { 27 | require( 28 | msg.sender == address(_entryPoint) || msg.sender == walletFactory, 29 | "only entry point or wallet factory can call" 30 | ); 31 | _; 32 | } 33 | 34 | constructor(IEntryPoint anEntryPoint, address ourWalletFactory) { 35 | _entryPoint = anEntryPoint; 36 | walletFactory = ourWalletFactory; 37 | } 38 | 39 | function initialize(address[] memory initialOwners) public initializer { 40 | _initialize(initialOwners); 41 | } 42 | 43 | function execute( 44 | address dest, 45 | uint256 value, 46 | bytes calldata func 47 | ) external _requireFromEntryPointOrFactory { 48 | _call(dest, value, func); 49 | } 50 | 51 | function executeBatch( 52 | address[] calldata dests, 53 | uint256[] calldata values, 54 | bytes[] calldata funcs 55 | ) external _requireFromEntryPointOrFactory { 56 | require(dests.length == funcs.length, "wrong array lengths"); 57 | require(values.length == funcs.length, "wrong values lengths"); 58 | for (uint256 i = 0; i < dests.length; i++) { 59 | _call(dests[i], values[i], funcs[i]); 60 | } 61 | } 62 | 63 | function _validateSignature( 64 | UserOperation calldata userOp, 65 | bytes32 userOpHash 66 | ) internal view override returns (uint256) { 67 | bytes32 hash = userOpHash.toEthSignedMessageHash(); 68 | bytes[] memory signatures = abi.decode(userOp.signature, (bytes[])); 69 | 70 | for (uint256 i = 0; i < owners.length; i++) { 71 | if (owners[i] != hash.recover(signatures[i])) { 72 | return SIG_VALIDATION_FAILED; 73 | } 74 | } 75 | return 0; 76 | } 77 | 78 | function _initialize(address[] memory initialOwners) internal { 79 | require(initialOwners.length > 0, "no owners"); 80 | owners = initialOwners; 81 | emit WalletInitialized(_entryPoint, initialOwners); 82 | } 83 | 84 | function _call(address target, uint256 value, bytes memory data) internal { 85 | (bool success, bytes memory result) = target.call{value: value}(data); 86 | if (!success) { 87 | assembly { 88 | revert(add(result, 32), mload(result)) 89 | } 90 | } 91 | } 92 | 93 | function encodeSignatures( 94 | bytes[] memory signatures 95 | ) public pure returns (bytes memory) { 96 | return abi.encode(signatures); 97 | } 98 | 99 | function entryPoint() public view override returns (IEntryPoint) { 100 | return _entryPoint; 101 | } 102 | 103 | function getDeposit() public view returns (uint256) { 104 | return entryPoint().balanceOf(address(this)); 105 | } 106 | 107 | function addDeposit() public payable { 108 | entryPoint().depositTo{value: msg.value}(address(this)); 109 | } 110 | 111 | function _authorizeUpgrade( 112 | address 113 | ) internal view override _requireFromEntryPointOrFactory {} 114 | 115 | receive() external payable {} 116 | } 117 | -------------------------------------------------------------------------------- /contracts/src/WalletFactory.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-3.0 2 | pragma solidity ^0.8.12; 3 | 4 | import {IEntryPoint} from "account-abstraction/interfaces/IEntryPoint.sol"; 5 | import {Wallet} from "./Wallet.sol"; 6 | import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; 7 | import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; 8 | 9 | contract WalletFactory { 10 | Wallet public immutable walletImplementation; 11 | 12 | constructor(IEntryPoint entryPoint) { 13 | walletImplementation = new Wallet(entryPoint, address(this)); 14 | } 15 | 16 | function createAccount( 17 | address[] memory owners, 18 | uint256 salt 19 | ) external returns (Wallet) { 20 | address addr = getAddress(owners, salt); 21 | uint256 codeSize = addr.code.length; 22 | if (codeSize > 0) { 23 | return Wallet(payable(addr)); 24 | } 25 | 26 | bytes memory walletInit = abi.encodeCall(Wallet.initialize, owners); 27 | ERC1967Proxy proxy = new ERC1967Proxy{salt: bytes32(salt)}( 28 | address(walletImplementation), 29 | walletInit 30 | ); 31 | 32 | return Wallet(payable(address(proxy))); 33 | } 34 | 35 | function getAddress( 36 | address[] memory owners, 37 | uint256 salt 38 | ) public view returns (address) { 39 | bytes memory walletInit = abi.encodeCall(Wallet.initialize, owners); 40 | bytes memory proxyConstructor = abi.encode( 41 | address(walletImplementation), 42 | walletInit 43 | ); 44 | bytes memory bytecode = abi.encodePacked( 45 | type(ERC1967Proxy).creationCode, 46 | proxyConstructor 47 | ); 48 | 49 | bytes32 bytecodeHash = keccak256(bytecode); 50 | 51 | return Create2.computeAddress(bytes32(salt), bytecodeHash); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | webpack: (config) => { 5 | config.resolve.fallback = { fs: false, net: false, tls: false }; 6 | config.externals.push("pino-pretty", "lokijs", "encoding"); 7 | return config; 8 | }, 9 | }; 10 | 11 | module.exports = nextConfig; 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-multisig", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "prisma generate && next build", 8 | "start": "next start", 9 | "lint": "next lint" 10 | }, 11 | "dependencies": { 12 | "@prisma/client": "5.1.1", 13 | "@rainbow-me/rainbowkit": "^1.0.8", 14 | "@types/node": "20.4.10", 15 | "@types/react": "18.2.20", 16 | "@types/react-dom": "18.2.7", 17 | "autoprefixer": "10.4.14", 18 | "eslint": "8.47.0", 19 | "eslint-config-next": "13.4.13", 20 | "ethers": "5", 21 | "next": "13.4.13", 22 | "postcss": "8.4.27", 23 | "react": "18.2.0", 24 | "react-dom": "18.2.0", 25 | "tailwindcss": "3.3.3", 26 | "typescript": "5.1.6", 27 | "userop": "^0.3.2", 28 | "wagmi": "^1.3.10" 29 | }, 30 | "devDependencies": { 31 | "prisma": "^5.1.1" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /prisma/schema.prisma: -------------------------------------------------------------------------------- 1 | // This is your Prisma schema file, 2 | // learn more about it in the docs: https://pris.ly/d/prisma-schema 3 | 4 | generator client { 5 | provider = "prisma-client-js" 6 | } 7 | 8 | datasource db { 9 | provider = "postgresql" 10 | url = env("DATABASE_URL") 11 | } 12 | 13 | model Wallet { 14 | id Int @id @default(autoincrement()) 15 | 16 | address String @unique 17 | signers String[] @default([]) 18 | isDeployed Boolean @default(false) 19 | 20 | salt String 21 | transactions Transaction[] 22 | } 23 | 24 | model Transaction { 25 | id Int @id @default(autoincrement()) 26 | 27 | walletId Int 28 | wallet Wallet @relation(fields: [walletId], references: [id]) 29 | 30 | txHash String? 31 | 32 | userOp Json 33 | signatures TransactionSignature[] 34 | } 35 | 36 | model TransactionSignature { 37 | id Int @id @default(autoincrement()) 38 | 39 | transactionId Int 40 | transaction Transaction @relation(fields: [transactionId], references: [id]) 41 | 42 | signerAddress String 43 | signature String 44 | } 45 | -------------------------------------------------------------------------------- /public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/app/[walletAddress]/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import Button from "@/components/button"; 3 | import TransactionsList from "@/components/transactionList"; 4 | import { getUserOpForETHTransfer } from "@/utils/getUserOpForETHTransfer"; 5 | import getUserOpHash from "@/utils/getUserOpHash"; 6 | import { parseEther } from "ethers/lib/utils"; 7 | import { useState } from "react"; 8 | import { useAccount, useWalletClient } from "wagmi"; 9 | 10 | export default function WalletPage({ 11 | params: { walletAddress }, 12 | }: { 13 | params: { walletAddress: string }; 14 | }) { 15 | const { address: userAddress } = useAccount(); 16 | const { data: walletClient } = useWalletClient(); 17 | 18 | const [toAddress, setToAddress] = useState(""); 19 | const [amount, setAmount] = useState(0); 20 | const [loading, setLoading] = useState(false); 21 | 22 | const fetchUserOp = async () => { 23 | try { 24 | const response = await fetch( 25 | `/api/fetch-wallet?walletAddress=${walletAddress}` 26 | ); 27 | const data = await response.json(); 28 | if (data.error) throw new Error(data.error); 29 | 30 | const amountBigInt = parseEther(amount.toString()); 31 | const userOp = await getUserOpForETHTransfer( 32 | walletAddress, 33 | data.signers, 34 | data.salt, 35 | toAddress, 36 | amountBigInt, 37 | data.isDeployed 38 | ); 39 | 40 | if (!userOp) throw new Error("Could not get user operation"); 41 | 42 | return userOp; 43 | } catch (e: any) { 44 | window.alert(e.message); 45 | throw new Error(e.message); 46 | } 47 | }; 48 | 49 | const createTransaction = async () => { 50 | try { 51 | setLoading(true); 52 | if (!userAddress) throw new Error("Could not get user address"); 53 | if (!walletClient) throw new Error("Could not get wallet client"); 54 | 55 | const userOp = await fetchUserOp(); 56 | if (!userOp) throw new Error("Could not fetch userOp"); 57 | 58 | const userOpHash = await getUserOpHash(userOp); 59 | const signature = await walletClient.signMessage({ 60 | message: { raw: userOpHash as `0x${string}` }, 61 | }); 62 | 63 | const response = await fetch("/api/create-transaction", { 64 | method: "POST", 65 | body: JSON.stringify({ 66 | walletAddress, 67 | userOp, 68 | signature, 69 | signerAddress: userAddress, 70 | }), 71 | headers: { 72 | "Content-Type": "application/json", 73 | }, 74 | }); 75 | 76 | const data = await response.json(); 77 | if (data.error) throw new Error(data.error); 78 | 79 | window.alert( 80 | "Transaction created and signed! Please ask other owners to sign to finally execute the transaction" 81 | ); 82 | window.location.reload(); 83 | } catch (err) { 84 | if (err instanceof Error) window.alert(err.message); 85 | console.error(err); 86 | setLoading(false); 87 | } 88 | }; 89 | 90 | return ( 91 |
92 |

Manage Wallet

93 |

94 | {walletAddress} 95 |

96 | 97 |

Send ETH

98 | 99 | setToAddress(e.target.value)} 103 | /> 104 | { 109 | if (e.target.value === "") { 110 | setAmount(0); 111 | return; 112 | } 113 | setAmount(parseFloat(e.target.value)); 114 | }} 115 | /> 116 | 117 | 120 | 121 | {userAddress && ( 122 | 123 | )} 124 |
125 | ); 126 | } 127 | -------------------------------------------------------------------------------- /src/app/api/create-signature/route.ts: -------------------------------------------------------------------------------- 1 | import { prisma } from "@/utils/db"; 2 | import { NextRequest, NextResponse } from "next/server"; 3 | 4 | export async function POST(req: NextRequest) { 5 | try { 6 | const { signature, signerAddress, transactionId } = await req.json(); 7 | 8 | await prisma.transaction.update({ 9 | where: { 10 | id: transactionId, 11 | }, 12 | data: { 13 | signatures: { 14 | create: { 15 | signature, 16 | signerAddress: signerAddress.toLowerCase(), 17 | }, 18 | }, 19 | }, 20 | }); 21 | 22 | return NextResponse.json({ success: true }); 23 | } catch (error) { 24 | console.error(error); 25 | return NextResponse.json({ error }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/app/api/create-transaction/route.ts: -------------------------------------------------------------------------------- 1 | import { prisma } from "@/utils/db"; 2 | import { isAddress } from "ethers/lib/utils"; 3 | import { NextRequest, NextResponse } from "next/server"; 4 | 5 | export async function POST(req: NextRequest) { 6 | try { 7 | const { walletAddress, userOp, signerAddress, signature } = 8 | await req.json(); 9 | 10 | if (!isAddress(walletAddress)) throw new Error("Invalid walletAddress"); 11 | 12 | await prisma.transaction.create({ 13 | data: { 14 | wallet: { 15 | connect: { 16 | address: walletAddress, 17 | }, 18 | }, 19 | userOp, 20 | signatures: { 21 | create: { 22 | signature, 23 | signerAddress: signerAddress.toLowerCase(), 24 | }, 25 | }, 26 | }, 27 | }); 28 | 29 | return NextResponse.json({ success: true }); 30 | } catch (error) { 31 | console.error(error); 32 | return NextResponse.json({ error }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/app/api/create-wallet/route.ts: -------------------------------------------------------------------------------- 1 | import { prisma } from "@/utils/db"; 2 | import { walletFactoryContract } from "@/utils/getContracts"; 3 | import { randomBytes } from "crypto"; 4 | import { NextRequest, NextResponse } from "next/server"; 5 | 6 | export async function POST(req: NextRequest) { 7 | try { 8 | const { signers }: { signers: string[] } = await req.json(); 9 | const salt = "0x" + randomBytes(32).toString("hex"); 10 | 11 | const walletAddress = await walletFactoryContract.getAddress(signers, salt); 12 | 13 | const response = await prisma.wallet.create({ 14 | data: { 15 | salt: salt, 16 | signers: signers.map((s) => s.toLowerCase()), 17 | isDeployed: false, 18 | address: walletAddress, 19 | }, 20 | }); 21 | 22 | return NextResponse.json(response); 23 | } catch (error) { 24 | console.error(error); 25 | return NextResponse.json({ error }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/app/api/fetch-transactions/route.ts: -------------------------------------------------------------------------------- 1 | import { prisma } from "@/utils/db"; 2 | import { isAddress } from "ethers/lib/utils"; 3 | import { NextRequest, NextResponse } from "next/server"; 4 | import { Transaction, TransactionSignature, Wallet } from "@prisma/client"; 5 | 6 | export const dynamic = "force-dynamic"; 7 | export type TransactionWithSignatures = Transaction & { 8 | signatures: TransactionSignature[]; 9 | wallet: Wallet; 10 | pendingSigners: string[]; 11 | }; 12 | 13 | export async function GET(req: NextRequest) { 14 | try { 15 | const { searchParams } = new URL(req.url); 16 | const walletAddress = searchParams.get("walletAddress"); 17 | 18 | if (!walletAddress) { 19 | throw new Error("Missing or invalid wallet address"); 20 | } 21 | 22 | if (!isAddress(walletAddress)) { 23 | throw new Error("Invalid Ethereum address"); 24 | } 25 | 26 | const transactions = await prisma.transaction.findMany({ 27 | where: { 28 | wallet: { 29 | address: walletAddress, 30 | }, 31 | }, 32 | include: { 33 | signatures: true, 34 | wallet: true, 35 | }, 36 | orderBy: { 37 | txHash: { 38 | sort: "asc", 39 | nulls: "first", 40 | }, 41 | }, 42 | }); 43 | 44 | const augmentedTransactions: TransactionWithSignatures[] = transactions.map( 45 | (transaction) => { 46 | const pendingSigners = transaction.wallet.signers.filter( 47 | (signer) => 48 | !transaction.signatures.find( 49 | (signature) => signature.signerAddress === signer 50 | ) 51 | ); 52 | 53 | return { 54 | ...transaction, 55 | pendingSigners, 56 | }; 57 | } 58 | ); 59 | 60 | return NextResponse.json({ transactions: augmentedTransactions }); 61 | } catch (error) { 62 | console.error(error); 63 | return NextResponse.json({ error }); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/app/api/fetch-wallet/route.ts: -------------------------------------------------------------------------------- 1 | import { prisma } from "@/utils/db"; 2 | import { isAddress } from "ethers/lib/utils"; 3 | import { NextRequest, NextResponse } from "next/server"; 4 | 5 | export const dynamic = "force-dynamic"; 6 | export async function GET(req: NextRequest) { 7 | try { 8 | const { searchParams } = new URL(req.url); 9 | const walletAddress = searchParams.get("walletAddress"); 10 | 11 | if (!walletAddress) { 12 | throw new Error("Missing or invalid address"); 13 | } 14 | 15 | if (!isAddress(walletAddress)) { 16 | throw new Error("Invalid Ethereum address"); 17 | } 18 | 19 | const wallet = await prisma.wallet.findFirst({ 20 | where: { 21 | address: walletAddress, 22 | }, 23 | }); 24 | 25 | return NextResponse.json(wallet); 26 | } catch (error) { 27 | console.error(error); 28 | return NextResponse.json({ error }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/app/api/fetch-wallets/route.ts: -------------------------------------------------------------------------------- 1 | import { prisma } from "@/utils/db"; 2 | import { isAddress } from "ethers/lib/utils"; 3 | import { NextRequest, NextResponse } from "next/server"; 4 | 5 | export const dynamic = "force-dynamic"; 6 | 7 | export async function GET(req: NextRequest) { 8 | try { 9 | const { searchParams } = new URL(req.url); 10 | const address = searchParams.get("address"); 11 | 12 | if (!address) { 13 | throw new Error("Missing or invalid address"); 14 | } 15 | 16 | if (!isAddress(address)) { 17 | throw new Error("Invalid Ethereum address"); 18 | } 19 | 20 | const wallets = await prisma.wallet.findMany({ 21 | where: { 22 | signers: { 23 | has: address.toLowerCase(), 24 | }, 25 | }, 26 | include: { 27 | _count: { 28 | select: { 29 | transactions: true, 30 | }, 31 | }, 32 | }, 33 | }); 34 | 35 | return NextResponse.json(wallets); 36 | } catch (error) { 37 | console.error(error); 38 | return NextResponse.json({ error }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/app/api/update-wallet-deployed/route.ts: -------------------------------------------------------------------------------- 1 | import { prisma } from "@/utils/db"; 2 | import { NextRequest, NextResponse } from "next/server"; 3 | 4 | export async function POST(req: NextRequest) { 5 | try { 6 | const { walletId, transactionId, txHash } = await req.json(); 7 | await prisma.wallet.update({ 8 | where: { 9 | id: walletId, 10 | }, 11 | data: { 12 | isDeployed: true, 13 | }, 14 | }); 15 | 16 | const res = await prisma.transaction.update({ 17 | where: { 18 | id: transactionId, 19 | }, 20 | data: { 21 | txHash, 22 | }, 23 | }); 24 | return NextResponse.json(res); 25 | } catch (error) { 26 | console.error(error); 27 | return NextResponse.json({ error }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/app/create-wallet/page.tsx: -------------------------------------------------------------------------------- 1 | import CreateSCW from "@/components/createSCW"; 2 | 3 | export default function CreateWalletPage() { 4 | return ( 5 |
6 |

Create New Wallet

7 |

8 | Enter the signer addresses for this account 9 |

10 | 11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LearnWeb3DAO/smart-contract-wallet/6e673ff1e2f0b76900604795d25b97b0701f8eb1/src/app/favicon.ico -------------------------------------------------------------------------------- /src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --foreground-rgb: 255, 255, 255; 7 | --background-start-rgb: 0, 0, 0; 8 | --background-end-rgb: 0, 0, 0; 9 | } 10 | 11 | body { 12 | color: rgb(var(--foreground-rgb)); 13 | background: linear-gradient( 14 | to bottom, 15 | transparent, 16 | rgb(var(--background-end-rgb)) 17 | ) 18 | rgb(var(--background-start-rgb)); 19 | } 20 | -------------------------------------------------------------------------------- /src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import Navbar from "@/components/navbar"; 3 | import Providers from "@/components/providers"; 4 | import { Inter } from "next/font/google"; 5 | import "./globals.css"; 6 | import Footer from "@/components/footer"; 7 | 8 | const inter = Inter({ subsets: ["latin"] }); 9 | 10 | export default function RootLayout({ 11 | children, 12 | }: { 13 | children: React.ReactNode; 14 | }) { 15 | return ( 16 | 17 | 18 | 19 |
20 | 21 | {children} 22 |
23 |
24 |
25 | 26 | 27 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /src/app/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import WalletList from "@/components/walletList"; 4 | import { useIsMounted } from "@/hooks/useIsMounted"; 5 | import Link from "next/link"; 6 | import { Fragment, useEffect, useState } from "react"; 7 | import { useAccount } from "wagmi"; 8 | 9 | export const dynamic = "force-dynamic"; 10 | 11 | export default function Home() { 12 | const { isConnected, address } = useAccount(); 13 | const isMounted = useIsMounted(); 14 | 15 | if (!isMounted) return null; 16 | 17 | return ( 18 |
19 |
20 | 21 | {isConnected && ( 22 | 26 | Create New Wallet 27 | 28 | )} 29 | 30 | {address && } 31 | 32 |
33 |
34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /src/components/button.tsx: -------------------------------------------------------------------------------- 1 | import React, { ButtonHTMLAttributes } from "react"; 2 | 3 | type ButtonProps = ButtonHTMLAttributes & { 4 | isLoading?: boolean; 5 | }; 6 | 7 | export default function Button(props: ButtonProps) { 8 | return ( 9 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/components/createSCW.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { isAddress } from "ethers/lib/utils"; 3 | import { useRouter } from "next/navigation"; 4 | import { useEffect, useRef, useState } from "react"; 5 | import { useAccount } from "wagmi"; 6 | import Icon from "./icon"; 7 | import Button from "./button"; 8 | 9 | export default function CreateSCW() { 10 | const { address } = useAccount(); 11 | const router = useRouter(); 12 | 13 | const [signers, setSigners] = useState([]); 14 | const lastInput = useRef(null); 15 | const [loading, setLoading] = useState(false); 16 | 17 | useEffect(() => { 18 | setSigners([address as string]); 19 | }, [address]); 20 | 21 | useEffect(() => { 22 | if (lastInput.current) { 23 | lastInput.current.focus(); 24 | } 25 | }, [signers]); 26 | 27 | function addNewSigner() { 28 | setSigners((signers) => [...signers, ""]); 29 | } 30 | 31 | function removeSigner(index: number) { 32 | if (signers[index] === undefined) return; 33 | if (signers[index].length > 0) return; 34 | if (signers.length <= 1) return; 35 | 36 | const newSigners = [...signers]; 37 | newSigners.splice(index, 1); 38 | setSigners(newSigners); 39 | } 40 | 41 | const onCreateSCW = async () => { 42 | try { 43 | setLoading(true); 44 | signers.forEach((signer) => { 45 | if (isAddress(signer) === false) { 46 | throw new Error(`Invalid address: ${signer}`); 47 | } 48 | }); 49 | 50 | const response = await fetch("/api/create-wallet", { 51 | method: "POST", 52 | body: JSON.stringify({ signers }), 53 | headers: { 54 | "Content-Type": "application/json", 55 | }, 56 | }); 57 | 58 | const data = await response.json(); 59 | if (data.error) { 60 | throw new Error(data.error); 61 | } 62 | window.alert(`Wallet created: ${data.address}`); 63 | router.push(`/`); 64 | } catch (error) { 65 | console.error(error); 66 | if (error instanceof Error) { 67 | window.alert(error.message); 68 | } 69 | } finally { 70 | setLoading(false); 71 | } 72 | }; 73 | 74 | return ( 75 |
76 | {signers.map((signer, index) => ( 77 |
78 | { 85 | if (event.key === "Enter") { 86 | addNewSigner(); 87 | } else if (event.key === "Backspace") { 88 | removeSigner(index); 89 | } 90 | }} 91 | onChange={(event) => { 92 | const newSigners = [...signers]; 93 | newSigners[index] = event.target.value; 94 | setSigners(newSigners); 95 | }} 96 | /> 97 | 98 | {index > 0 && ( 99 |
removeSigner(index)} 102 | > 103 | 104 |
105 | )} 106 |
107 | ))} 108 | {loading ? ( 109 |
110 | ) : ( 111 |
112 | 113 | 114 |
115 | )} 116 |
117 | ); 118 | } 119 | -------------------------------------------------------------------------------- /src/components/footer.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | 3 | export default function Footer() { 4 | return ( 5 |
6 | Build your own account-abstracted multisig wallet with{" "} 7 | 12 | LearnWeb3 13 | 14 | ! 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /src/components/icon.tsx: -------------------------------------------------------------------------------- 1 | interface IconProps { 2 | type: "user" | "xmark" | "check"; 3 | } 4 | 5 | export default function Icon({ type }: IconProps) { 6 | if (type === "user") { 7 | return ( 8 | 16 | 21 | 22 | ); 23 | } 24 | 25 | if (type === "xmark") { 26 | return ( 27 | 35 | 40 | 41 | ); 42 | } 43 | 44 | if (type === "check") { 45 | return ( 46 | 54 | 59 | 60 | ); 61 | } 62 | 63 | return null; 64 | } 65 | -------------------------------------------------------------------------------- /src/components/navbar.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { ConnectButton } from "@rainbow-me/rainbowkit"; 3 | import Link from "next/link"; 4 | 5 | export default function Navbar() { 6 | return ( 7 |
8 |
9 | 10 | Home 11 | 12 | 13 | 14 | Create New Wallet 15 | 16 |
17 | 18 | 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /src/components/providers.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { 3 | darkTheme, 4 | getDefaultWallets, 5 | RainbowKitProvider, 6 | } from "@rainbow-me/rainbowkit"; 7 | import "@rainbow-me/rainbowkit/styles.css"; 8 | import { configureChains, createConfig, WagmiConfig } from "wagmi"; 9 | import { goerli } from "wagmi/chains"; 10 | import { publicProvider } from "wagmi/providers/public"; 11 | 12 | const { chains, publicClient } = configureChains([goerli], [publicProvider()]); 13 | 14 | const { connectors } = getDefaultWallets({ 15 | appName: "scw", 16 | projectId: `${process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID}`, 17 | chains, 18 | }); 19 | 20 | const wagmiConfig = createConfig({ 21 | autoConnect: true, 22 | connectors, 23 | publicClient, 24 | }); 25 | 26 | export default function Providers({ children }: { children: React.ReactNode }) { 27 | return ( 28 | 29 | 30 | {children} 31 | 32 | 33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /src/components/transactionList.tsx: -------------------------------------------------------------------------------- 1 | import { TransactionWithSignatures } from "@/app/api/fetch-transactions/route"; 2 | import { BUNDLER_RPC_URL } from "@/utils/constants"; 3 | import { getUserOperationBuilder } from "@/utils/getUserOperationBuilder"; 4 | import getUserOpHash from "@/utils/getUserOpHash"; 5 | import { BigNumber } from "ethers"; 6 | import { useEffect, useState } from "react"; 7 | import { Client, IUserOperation } from "userop"; 8 | import { useWalletClient } from "wagmi"; 9 | import Button from "./button"; 10 | import Icon from "./icon"; 11 | import { useIsMounted } from "@/hooks/useIsMounted"; 12 | 13 | interface TransactionListProps { 14 | address: string; 15 | walletAddress: string; 16 | } 17 | 18 | export default function TransactionsList({ 19 | address, 20 | walletAddress, 21 | }: TransactionListProps) { 22 | const isMounted = useIsMounted(); 23 | const { data: walletClient } = useWalletClient(); 24 | 25 | const [walletTxns, setWalletTxns] = useState([]); 26 | const [loading, setLoading] = useState(false); 27 | 28 | const fetchTransactions = async () => { 29 | try { 30 | const response = await fetch( 31 | `/api/fetch-transactions?walletAddress=${walletAddress}` 32 | ); 33 | const data = await response.json(); 34 | if (data.error) throw new Error(data.error); 35 | 36 | setWalletTxns(data.transactions); 37 | } catch (error) { 38 | if (error instanceof Error) window.alert(error.message); 39 | console.error(error); 40 | } 41 | }; 42 | 43 | const signTransaction = async (transaction: TransactionWithSignatures) => { 44 | if (!walletClient) return; 45 | 46 | try { 47 | setLoading(true); 48 | 49 | const userOpHash = await getUserOpHash( 50 | transaction.userOp as unknown as IUserOperation 51 | ); 52 | const signature = await walletClient.signMessage({ 53 | message: { raw: userOpHash as `0x${string}` }, 54 | }); 55 | 56 | const response = await fetch("/api/create-signature", { 57 | method: "POST", 58 | body: JSON.stringify({ 59 | signerAddress: address, 60 | signature, 61 | transactionId: transaction.id, 62 | }), 63 | }); 64 | const data = await response.json(); 65 | 66 | if (data.error) throw new Error(data.error); 67 | 68 | window.alert("Transaction signed successfully"); 69 | window.location.reload(); 70 | } catch (e) { 71 | console.error(e); 72 | if (e instanceof Error) window.alert(e.message); 73 | setLoading(false); 74 | } 75 | }; 76 | 77 | const sendTransaction = async (transaction: TransactionWithSignatures) => { 78 | try { 79 | setLoading(true); 80 | 81 | const userOp = transaction.userOp as unknown as IUserOperation; 82 | const client = await Client.init(BUNDLER_RPC_URL); 83 | 84 | const orderedSignatures: string[] = []; 85 | transaction.wallet.signers.forEach((signer) => { 86 | transaction.signatures.forEach((signature) => { 87 | if (signature.signerAddress === signer) { 88 | orderedSignatures.push(signature.signature); 89 | } 90 | }); 91 | }); 92 | 93 | if (orderedSignatures.length != transaction.wallet.signers.length) 94 | throw new Error("Fewer signatures received than expected"); 95 | 96 | let initCode = userOp.initCode as Uint8Array; 97 | if (transaction.wallet.isDeployed) { 98 | initCode = Uint8Array.from([]); 99 | } 100 | 101 | const builder = await getUserOperationBuilder( 102 | userOp.sender, 103 | BigNumber.from(userOp.nonce), 104 | initCode, 105 | userOp.callData.toString(), 106 | orderedSignatures 107 | ); 108 | 109 | builder 110 | .setMaxFeePerGas(userOp.maxFeePerGas) 111 | .setMaxPriorityFeePerGas(userOp.maxPriorityFeePerGas); 112 | 113 | const result = await client.sendUserOperation(builder); 114 | const finalUserOpResult = await result.wait(); 115 | const txHashReciept = await finalUserOpResult?.getTransactionReceipt(); 116 | 117 | const txHash = txHashReciept?.transactionHash; 118 | 119 | // mark the wallet as deployed 120 | await fetch("/api/update-wallet-deployed", { 121 | method: "POST", 122 | body: JSON.stringify({ 123 | walletId: transaction.wallet.id, 124 | transactionId: transaction.id, 125 | txHash, 126 | }), 127 | }); 128 | 129 | window.alert("Transaction sent successfully"); 130 | window.location.reload(); 131 | } catch (e) { 132 | console.error(e); 133 | if (e instanceof Error) { 134 | window.alert(e.message); 135 | } 136 | setLoading(false); 137 | } 138 | }; 139 | 140 | useEffect(() => { 141 | fetchTransactions(); 142 | // eslint-disable-next-line react-hooks/exhaustive-deps 143 | }, [address]); 144 | 145 | if (!isMounted) return null; 146 | 147 | return ( 148 |
149 |

Transactions

150 | 151 | {walletTxns.length === 0 && ( 152 |
153 |

You currently have no transactions.

154 |
155 | )} 156 | 157 | {walletTxns.length > 0 && ( 158 |
159 | {walletTxns.map((transaction) => ( 160 |
164 | 165 | Transaction #{transaction.id} 166 | 167 |
168 | {transaction.signatures.map((signature) => ( 169 |
173 | {signature.signerAddress} 174 | 175 |
176 | ))} 177 | {transaction.pendingSigners.map((signer) => ( 178 |
179 | {signer} 180 | 181 |
182 | ))} 183 | 184 | {transaction.txHash ? ( 185 | 195 | ) : transaction.pendingSigners.length === 0 ? ( 196 | 202 | ) : transaction.pendingSigners.includes( 203 | address.toLowerCase() 204 | ) ? ( 205 | 211 | ) : ( 212 | 213 | )} 214 |
215 |
216 | ))} 217 |
218 | )} 219 |
220 | ); 221 | } 222 | -------------------------------------------------------------------------------- /src/components/walletList.tsx: -------------------------------------------------------------------------------- 1 | import { Wallet } from "@prisma/client"; 2 | import Link from "next/link"; 3 | import { useEffect, useState } from "react"; 4 | import Icon from "./icon"; 5 | import Button from "./button"; 6 | 7 | type WalletWithTxnsCount = Wallet & { 8 | _count: { 9 | transactions: number; 10 | }; 11 | }; 12 | 13 | export default function WalletList({ address }: { address: string }) { 14 | const [wallets, setWallets] = useState([]); 15 | 16 | useEffect(() => { 17 | fetch(`/api/fetch-wallets?address=${address}`) 18 | .then((response) => response.json()) 19 | .then((data) => setWallets(data)); 20 | }, [address]); 21 | 22 | return ( 23 |
24 |

Your Wallets

25 | 26 | {wallets.length === 0 ? ( 27 |
28 |

29 | You currently have no smart contract wallets. 30 |

31 |
32 | ) : ( 33 |
34 | {wallets.length > 0 && 35 | wallets.map((wallet) => ( 36 |
40 | 44 |
45 | {wallet.address} 46 |

47 | Pending Txns: {wallet._count.transactions} 48 |

49 |
50 | {wallet.isDeployed ? ( 51 |
52 | ) : ( 53 |
54 | )} 55 | 56 |

57 | {wallet.isDeployed ? "Deployed" : "Not Deployed"} 58 |

59 |
60 |
61 | 62 | 63 |
64 | {wallet.signers.length > 0 && 65 | wallet.signers.map((signer, idx) => ( 66 |
70 | 71 |

{signer}

72 | 77 | Etherscan 78 | 79 |
80 | ))} 81 |
82 |
83 | ))} 84 |
85 | )} 86 |
87 | ); 88 | } 89 | -------------------------------------------------------------------------------- /src/hooks/useIsMounted.ts: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from "react"; 2 | 3 | export function useIsMounted() { 4 | const [isMounted, setIsMounted] = useState(false); 5 | 6 | useEffect(() => { 7 | setIsMounted(true); 8 | }, []); 9 | 10 | return isMounted; 11 | } 12 | -------------------------------------------------------------------------------- /src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const WALLET_FACTORY_ADDRESS = 2 | "0xb0Bf9070777B5a0591e7203855D23CB081d1fb50"; 3 | 4 | export const BUNDLER_RPC_URL = `https://api.stackup.sh/v1/node/${process.env.NEXT_PUBLIC_STACKUP_API_KEY}`; 5 | 6 | export const WALLET_FACTORY_ABI = [ 7 | { 8 | inputs: [ 9 | { 10 | internalType: "contract IEntryPoint", 11 | name: "entryPoint", 12 | type: "address", 13 | }, 14 | ], 15 | stateMutability: "nonpayable", 16 | type: "constructor", 17 | }, 18 | { 19 | inputs: [ 20 | { 21 | internalType: "address[]", 22 | name: "owners", 23 | type: "address[]", 24 | }, 25 | { 26 | internalType: "uint256", 27 | name: "salt", 28 | type: "uint256", 29 | }, 30 | ], 31 | name: "createAccount", 32 | outputs: [ 33 | { 34 | internalType: "contract Wallet", 35 | name: "", 36 | type: "address", 37 | }, 38 | ], 39 | stateMutability: "nonpayable", 40 | type: "function", 41 | }, 42 | { 43 | inputs: [ 44 | { 45 | internalType: "address[]", 46 | name: "owners", 47 | type: "address[]", 48 | }, 49 | { 50 | internalType: "uint256", 51 | name: "salt", 52 | type: "uint256", 53 | }, 54 | ], 55 | name: "getAddress", 56 | outputs: [ 57 | { 58 | internalType: "address", 59 | name: "", 60 | type: "address", 61 | }, 62 | ], 63 | stateMutability: "view", 64 | type: "function", 65 | }, 66 | { 67 | inputs: [], 68 | name: "walletImplementation", 69 | outputs: [ 70 | { 71 | internalType: "contract Wallet", 72 | name: "", 73 | type: "address", 74 | }, 75 | ], 76 | stateMutability: "view", 77 | type: "function", 78 | }, 79 | ] as const; 80 | 81 | export const ENTRY_POINT_ABI = [ 82 | { 83 | inputs: [ 84 | { 85 | internalType: "address", 86 | name: "sender", 87 | type: "address", 88 | }, 89 | { 90 | internalType: "uint192", 91 | name: "key", 92 | type: "uint192", 93 | }, 94 | ], 95 | name: "getNonce", 96 | outputs: [ 97 | { 98 | internalType: "uint256", 99 | name: "nonce", 100 | type: "uint256", 101 | }, 102 | ], 103 | stateMutability: "view", 104 | type: "function", 105 | }, 106 | ] as const; 107 | 108 | export const WALLET_ABI = [ 109 | { 110 | inputs: [ 111 | { 112 | internalType: "address", 113 | name: "dest", 114 | type: "address", 115 | }, 116 | { 117 | internalType: "uint256", 118 | name: "value", 119 | type: "uint256", 120 | }, 121 | { 122 | internalType: "bytes", 123 | name: "func", 124 | type: "bytes", 125 | }, 126 | ], 127 | name: "execute", 128 | outputs: [], 129 | stateMutability: "nonpayable", 130 | type: "function", 131 | }, 132 | ] as const; 133 | -------------------------------------------------------------------------------- /src/utils/db.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | const globalForPrisma = globalThis as unknown as { 4 | prisma: PrismaClient | undefined; 5 | }; 6 | 7 | export const prisma = globalForPrisma.prisma ?? new PrismaClient(); 8 | 9 | if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; 10 | -------------------------------------------------------------------------------- /src/utils/getContracts.ts: -------------------------------------------------------------------------------- 1 | import { Contract, providers } from "ethers"; 2 | import { Constants } from "userop"; 3 | import { 4 | BUNDLER_RPC_URL, 5 | ENTRY_POINT_ABI, 6 | WALLET_ABI, 7 | WALLET_FACTORY_ABI, 8 | WALLET_FACTORY_ADDRESS, 9 | } from "./constants"; 10 | 11 | export const provider = new providers.JsonRpcProvider(BUNDLER_RPC_URL); 12 | 13 | export const entryPointContract = new Contract( 14 | Constants.ERC4337.EntryPoint, 15 | ENTRY_POINT_ABI, 16 | provider 17 | ); 18 | 19 | export const walletFactoryContract = new Contract( 20 | WALLET_FACTORY_ADDRESS, 21 | WALLET_FACTORY_ABI, 22 | provider 23 | ); 24 | 25 | export const getWalletContract = (walletAddress: string) => { 26 | return new Contract(walletAddress, WALLET_ABI, provider); 27 | }; 28 | -------------------------------------------------------------------------------- /src/utils/getUserOpForETHTransfer.ts: -------------------------------------------------------------------------------- 1 | import { BigNumber } from "ethers"; 2 | import { concat } from "ethers/lib/utils"; 3 | import { Client, Presets } from "userop"; 4 | import { BUNDLER_RPC_URL, WALLET_FACTORY_ADDRESS } from "./constants"; 5 | import { 6 | entryPointContract, 7 | getWalletContract, 8 | provider, 9 | walletFactoryContract, 10 | } from "./getContracts"; 11 | import { getUserOperationBuilder } from "./getUserOperationBuilder"; 12 | 13 | export async function getUserOpForETHTransfer( 14 | walletAddress: string, 15 | owners: string[], 16 | salt: string, 17 | toAddress: string, 18 | value: BigNumber, 19 | isDeployed?: boolean 20 | ) { 21 | try { 22 | let initCode = Uint8Array.from([]); 23 | if (!isDeployed) { 24 | const data = walletFactoryContract.interface.encodeFunctionData( 25 | "createAccount", 26 | [owners, salt] 27 | ); 28 | initCode = concat([WALLET_FACTORY_ADDRESS, data]); 29 | } 30 | 31 | const nonce: BigNumber = await entryPointContract.getNonce( 32 | walletAddress, 33 | 0 34 | ); 35 | 36 | const walletContract = getWalletContract(walletAddress); 37 | const encodedCallData = walletContract.interface.encodeFunctionData( 38 | "execute", 39 | [toAddress, value, initCode] 40 | ); 41 | 42 | const builder = await getUserOperationBuilder( 43 | walletContract.address, 44 | nonce, 45 | initCode, 46 | encodedCallData, 47 | [] 48 | ); 49 | 50 | builder.useMiddleware(Presets.Middleware.getGasPrice(provider)); 51 | 52 | const client = await Client.init(BUNDLER_RPC_URL); 53 | await client.buildUserOperation(builder); 54 | const userOp = builder.getOp(); 55 | 56 | return userOp; 57 | } catch (e) { 58 | console.error(e); 59 | if (e instanceof Error) { 60 | window.alert(e.message); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/utils/getUserOpHash.ts: -------------------------------------------------------------------------------- 1 | import { defaultAbiCoder, keccak256 } from "ethers/lib/utils"; 2 | import { Constants, IUserOperation } from "userop"; 3 | import { goerli } from "wagmi/chains"; 4 | 5 | export default async function getUserOpHash(userOp: IUserOperation) { 6 | const encodedUserOp = defaultAbiCoder.encode( 7 | [ 8 | "address", 9 | "uint256", 10 | "bytes32", 11 | "bytes32", 12 | "uint256", 13 | "uint256", 14 | "uint256", 15 | "uint256", 16 | "uint256", 17 | "bytes32", 18 | ], 19 | [ 20 | userOp.sender, 21 | userOp.nonce, 22 | keccak256(userOp.initCode), 23 | keccak256(userOp.callData), 24 | userOp.callGasLimit, 25 | userOp.verificationGasLimit, 26 | userOp.preVerificationGas, 27 | userOp.maxFeePerGas, 28 | userOp.maxPriorityFeePerGas, 29 | keccak256(userOp.paymasterAndData), 30 | ] 31 | ); 32 | const encodedUserOpWithChainIdAndEntryPoint = defaultAbiCoder.encode( 33 | ["bytes32", "address", "uint256"], 34 | [keccak256(encodedUserOp), Constants.ERC4337.EntryPoint, goerli.id] 35 | ); 36 | 37 | return keccak256(encodedUserOpWithChainIdAndEntryPoint); 38 | } 39 | -------------------------------------------------------------------------------- /src/utils/getUserOperationBuilder.ts: -------------------------------------------------------------------------------- 1 | import { BigNumber } from "ethers"; 2 | import { defaultAbiCoder } from "ethers/lib/utils"; 3 | import { UserOperationBuilder } from "userop"; 4 | 5 | export async function getUserOperationBuilder( 6 | walletContract: string, 7 | nonce: BigNumber, 8 | initCode: Uint8Array, 9 | encodedCallData: string, 10 | signatures: string[] 11 | ) { 12 | try { 13 | const encodedSignatures = defaultAbiCoder.encode(["bytes[]"], [signatures]); 14 | const builder = new UserOperationBuilder() 15 | .useDefaults({ 16 | preVerificationGas: 100_000, 17 | callGasLimit: 100_000, 18 | verificationGasLimit: 2_000_000, 19 | }) 20 | .setSender(walletContract) 21 | .setNonce(nonce) 22 | .setCallData(encodedCallData) 23 | .setSignature(encodedSignatures) 24 | .setInitCode(initCode); 25 | 26 | return builder; 27 | } catch (e) { 28 | console.error(e); 29 | throw e; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from 'tailwindcss' 2 | 3 | const config: Config = { 4 | content: [ 5 | './src/pages/**/*.{js,ts,jsx,tsx,mdx}', 6 | './src/components/**/*.{js,ts,jsx,tsx,mdx}', 7 | './src/app/**/*.{js,ts,jsx,tsx,mdx}', 8 | ], 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 13 | 'gradient-conic': 14 | 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 15 | }, 16 | }, 17 | }, 18 | plugins: [], 19 | } 20 | export default config 21 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "bundler", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "plugins": [ 18 | { 19 | "name": "next" 20 | } 21 | ], 22 | "paths": { 23 | "@/*": ["./src/*"] 24 | } 25 | }, 26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 27 | "exclude": ["node_modules", "contracts"] 28 | } 29 | --------------------------------------------------------------------------------