From 905154b1da5453701eb20bf184097d5c3ded41c8 Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 27 Aug 2025 10:03:46 -0400 Subject: [PATCH 01/46] Add Zama from solidity --- packages/core/confidential/.gitignore | 4 + packages/core/confidential/CHANGELOG.md | 2 + packages/core/confidential/LICENSE | 661 ++ packages/core/confidential/NOTICE | 8 + packages/core/confidential/README.md | 132 + packages/core/confidential/ava.config.js | 9 + .../confidential/contracts/SafetyCheck.sol | 13 + packages/core/confidential/get-imports.d.ts | 1 + packages/core/confidential/get-imports.js | 1 + packages/core/confidential/hardhat.config.js | 71 + .../confidential/openzeppelin-contracts.d.ts | 18 + packages/core/confidential/package.json | 39 + packages/core/confidential/print-versioned.js | 1 + packages/core/confidential/print-versioned.ts | 1 + packages/core/confidential/remappings.txt | 2 + .../core/confidential/src/account.test.ts | 121 + .../core/confidential/src/account.test.ts.md | 3485 ++++++ .../confidential/src/account.test.ts.snap | Bin 0 -> 4740 bytes packages/core/confidential/src/account.ts | 296 + .../core/confidential/src/add-pausable.ts | 37 + packages/core/confidential/src/api.ts | 108 + .../core/confidential/src/build-generic.ts | 61 + .../core/confidential/src/common-functions.ts | 9 + .../core/confidential/src/common-options.ts | 24 + .../core/confidential/src/contract.test.ts | 174 + .../core/confidential/src/contract.test.ts.md | 288 + .../confidential/src/contract.test.ts.snap | Bin 0 -> 1009 bytes packages/core/confidential/src/contract.ts | 222 + packages/core/confidential/src/custom.test.ts | 101 + .../core/confidential/src/custom.test.ts.md | 192 + .../core/confidential/src/custom.test.ts.snap | Bin 0 -> 859 bytes packages/core/confidential/src/custom.ts | 56 + .../environments/hardhat/package-lock.json | 7870 ++++++++++++++ .../src/environments/hardhat/package.json | 16 + .../hardhat/upgradeable/package-lock.json | 9653 +++++++++++++++++ .../hardhat/upgradeable/package.json | 18 + .../core/confidential/src/erc1155.test.ts | 137 + .../core/confidential/src/erc1155.test.ts.md | 601 + .../confidential/src/erc1155.test.ts.snap | Bin 0 -> 1803 bytes packages/core/confidential/src/erc1155.ts | 178 + packages/core/confidential/src/erc20.test.ts | 314 + .../core/confidential/src/erc20.test.ts.md | 1388 +++ .../core/confidential/src/erc20.test.ts.snap | Bin 0 -> 3446 bytes packages/core/confidential/src/erc20.ts | 457 + packages/core/confidential/src/erc721.test.ts | 160 + .../core/confidential/src/erc721.test.ts.md | 779 ++ .../core/confidential/src/erc721.test.ts.snap | Bin 0 -> 2208 bytes packages/core/confidential/src/erc721.ts | 266 + packages/core/confidential/src/error.ts | 7 + .../core/confidential/src/generate/account.ts | 20 + .../confidential/src/generate/alternatives.ts | 32 + .../core/confidential/src/generate/custom.ts | 19 + .../core/confidential/src/generate/erc1155.ts | 24 + .../core/confidential/src/generate/erc20.ts | 35 + .../core/confidential/src/generate/erc721.ts | 28 + .../confidential/src/generate/governor.ts | 33 + .../core/confidential/src/generate/sources.ts | 131 + .../confidential/src/generate/stablecoin.ts | 52 + .../core/confidential/src/get-imports.test.ts | 97 + packages/core/confidential/src/get-imports.ts | 45 + .../core/confidential/src/governor.test.ts | 167 + .../core/confidential/src/governor.test.ts.md | 1703 +++ .../confidential/src/governor.test.ts.snap | Bin 0 -> 2350 bytes packages/core/confidential/src/governor.ts | 496 + packages/core/confidential/src/index.ts | 32 + .../confidential/src/infer-transpiled.test.ts | 12 + .../core/confidential/src/infer-transpiled.ts | 5 + packages/core/confidential/src/kind.ts | 33 + packages/core/confidential/src/options.ts | 49 + .../core/confidential/src/print-versioned.ts | 14 + packages/core/confidential/src/print.ts | 277 + .../core/confidential/src/scripts/prepare.ts | 60 + .../confidential/src/set-access-control.ts | 96 + .../core/confidential/src/set-clock-mode.ts | 33 + packages/core/confidential/src/set-info.ts | 24 + .../core/confidential/src/set-upgradeable.ts | 66 + packages/core/confidential/src/signer.ts | 119 + .../confidential/src/solidity-version.json | 1 + .../core/confidential/src/stablecoin.test.ts | 169 + .../confidential/src/stablecoin.test.ts.md | 692 ++ .../confidential/src/stablecoin.test.ts.snap | Bin 0 -> 2127 bytes packages/core/confidential/src/stablecoin.ts | 163 + packages/core/confidential/src/test.ts | 102 + .../community-contracts-git-commit.test.ts | 115 + .../utils/community-contracts-git-commit.ts | 38 + .../src/utils/convert-strings.test.ts | 23 + .../confidential/src/utils/convert-strings.ts | 27 + .../src/utils/define-functions.ts | 9 + .../core/confidential/src/utils/duration.ts | 52 + .../core/confidential/src/utils/find-cover.ts | 26 + .../confidential/src/utils/format-lines.ts | 30 + .../src/utils/imports-libraries.ts | 5 + .../core/confidential/src/utils/map-values.ts | 8 + .../confidential/src/utils/sanitize.test.ts | 46 + .../core/confidential/src/utils/sanitize.ts | 6 + .../core/confidential/src/utils/sorted-by.ts | 3 + .../src/utils/to-identifier.test.ts | 20 + .../confidential/src/utils/to-identifier.ts | 8 + .../src/utils/transitive-closure.ts | 27 + .../confidential/src/utils/version.test.ts | 14 + .../core/confidential/src/utils/version.ts | 4 + .../core/confidential/src/zip-foundry.test.ts | 223 + .../confidential/src/zip-foundry.test.ts.md | 1453 +++ .../confidential/src/zip-foundry.test.ts.snap | Bin 0 -> 3951 bytes packages/core/confidential/src/zip-foundry.ts | 304 + .../core/confidential/src/zip-hardhat.test.ts | 236 + .../confidential/src/zip-hardhat.test.ts.md | 641 ++ .../confidential/src/zip-hardhat.test.ts.snap | Bin 0 -> 2824 bytes packages/core/confidential/src/zip-hardhat.ts | 232 + packages/core/confidential/tsconfig.json | 16 + packages/core/confidential/zip-env-foundry.js | 1 + packages/core/confidential/zip-env-foundry.ts | 1 + packages/core/confidential/zip-env-hardhat.js | 1 + packages/core/confidential/zip-env-hardhat.ts | 1 + packages/ui/public/index.html | 1 + packages/ui/public/zama.html | 99 + .../confidential/AccessControlSection.svelte | 62 + .../src/confidential/AccountControls.svelte | 215 + packages/ui/src/confidential/App.svelte | 528 + .../ui/src/confidential/CustomControls.svelte | 48 + .../src/confidential/ERC1155Controls.svelte | 82 + .../ui/src/confidential/ERC20Controls.svelte | 201 + .../ui/src/confidential/ERC721Controls.svelte | 134 + .../src/confidential/GovernorControls.svelte | 260 + .../ui/src/confidential/InfoSection.svelte | 32 + .../RealWorldAssetControls.svelte | 236 + .../confidential/StablecoinControls.svelte | 233 + .../confidential/UpgradeabilitySection.svelte | 35 + packages/ui/src/confidential/highlightjs.ts | 7 + .../ui/src/confidential/inject-hyperlinks.ts | 33 + packages/ui/src/confidential/remix.ts | 15 + .../ui/src/confidential/superchain-tooltip.ts | 12 + packages/ui/src/main.ts | 2 +- 133 files changed, 38614 insertions(+), 1 deletion(-) create mode 100644 packages/core/confidential/.gitignore create mode 100644 packages/core/confidential/CHANGELOG.md create mode 100644 packages/core/confidential/LICENSE create mode 100644 packages/core/confidential/NOTICE create mode 100644 packages/core/confidential/README.md create mode 100644 packages/core/confidential/ava.config.js create mode 100644 packages/core/confidential/contracts/SafetyCheck.sol create mode 100644 packages/core/confidential/get-imports.d.ts create mode 100644 packages/core/confidential/get-imports.js create mode 100644 packages/core/confidential/hardhat.config.js create mode 100644 packages/core/confidential/openzeppelin-contracts.d.ts create mode 100644 packages/core/confidential/package.json create mode 100644 packages/core/confidential/print-versioned.js create mode 100644 packages/core/confidential/print-versioned.ts create mode 100644 packages/core/confidential/remappings.txt create mode 100644 packages/core/confidential/src/account.test.ts create mode 100644 packages/core/confidential/src/account.test.ts.md create mode 100644 packages/core/confidential/src/account.test.ts.snap create mode 100644 packages/core/confidential/src/account.ts create mode 100644 packages/core/confidential/src/add-pausable.ts create mode 100644 packages/core/confidential/src/api.ts create mode 100644 packages/core/confidential/src/build-generic.ts create mode 100644 packages/core/confidential/src/common-functions.ts create mode 100644 packages/core/confidential/src/common-options.ts create mode 100644 packages/core/confidential/src/contract.test.ts create mode 100644 packages/core/confidential/src/contract.test.ts.md create mode 100644 packages/core/confidential/src/contract.test.ts.snap create mode 100644 packages/core/confidential/src/contract.ts create mode 100644 packages/core/confidential/src/custom.test.ts create mode 100644 packages/core/confidential/src/custom.test.ts.md create mode 100644 packages/core/confidential/src/custom.test.ts.snap create mode 100644 packages/core/confidential/src/custom.ts create mode 100644 packages/core/confidential/src/environments/hardhat/package-lock.json create mode 100644 packages/core/confidential/src/environments/hardhat/package.json create mode 100644 packages/core/confidential/src/environments/hardhat/upgradeable/package-lock.json create mode 100644 packages/core/confidential/src/environments/hardhat/upgradeable/package.json create mode 100644 packages/core/confidential/src/erc1155.test.ts create mode 100644 packages/core/confidential/src/erc1155.test.ts.md create mode 100644 packages/core/confidential/src/erc1155.test.ts.snap create mode 100644 packages/core/confidential/src/erc1155.ts create mode 100644 packages/core/confidential/src/erc20.test.ts create mode 100644 packages/core/confidential/src/erc20.test.ts.md create mode 100644 packages/core/confidential/src/erc20.test.ts.snap create mode 100644 packages/core/confidential/src/erc20.ts create mode 100644 packages/core/confidential/src/erc721.test.ts create mode 100644 packages/core/confidential/src/erc721.test.ts.md create mode 100644 packages/core/confidential/src/erc721.test.ts.snap create mode 100644 packages/core/confidential/src/erc721.ts create mode 100644 packages/core/confidential/src/error.ts create mode 100644 packages/core/confidential/src/generate/account.ts create mode 100644 packages/core/confidential/src/generate/alternatives.ts create mode 100644 packages/core/confidential/src/generate/custom.ts create mode 100644 packages/core/confidential/src/generate/erc1155.ts create mode 100644 packages/core/confidential/src/generate/erc20.ts create mode 100644 packages/core/confidential/src/generate/erc721.ts create mode 100644 packages/core/confidential/src/generate/governor.ts create mode 100644 packages/core/confidential/src/generate/sources.ts create mode 100644 packages/core/confidential/src/generate/stablecoin.ts create mode 100644 packages/core/confidential/src/get-imports.test.ts create mode 100644 packages/core/confidential/src/get-imports.ts create mode 100644 packages/core/confidential/src/governor.test.ts create mode 100644 packages/core/confidential/src/governor.test.ts.md create mode 100644 packages/core/confidential/src/governor.test.ts.snap create mode 100644 packages/core/confidential/src/governor.ts create mode 100644 packages/core/confidential/src/index.ts create mode 100644 packages/core/confidential/src/infer-transpiled.test.ts create mode 100644 packages/core/confidential/src/infer-transpiled.ts create mode 100644 packages/core/confidential/src/kind.ts create mode 100644 packages/core/confidential/src/options.ts create mode 100644 packages/core/confidential/src/print-versioned.ts create mode 100644 packages/core/confidential/src/print.ts create mode 100644 packages/core/confidential/src/scripts/prepare.ts create mode 100644 packages/core/confidential/src/set-access-control.ts create mode 100644 packages/core/confidential/src/set-clock-mode.ts create mode 100644 packages/core/confidential/src/set-info.ts create mode 100644 packages/core/confidential/src/set-upgradeable.ts create mode 100644 packages/core/confidential/src/signer.ts create mode 100644 packages/core/confidential/src/solidity-version.json create mode 100644 packages/core/confidential/src/stablecoin.test.ts create mode 100644 packages/core/confidential/src/stablecoin.test.ts.md create mode 100644 packages/core/confidential/src/stablecoin.test.ts.snap create mode 100644 packages/core/confidential/src/stablecoin.ts create mode 100644 packages/core/confidential/src/test.ts create mode 100644 packages/core/confidential/src/utils/community-contracts-git-commit.test.ts create mode 100644 packages/core/confidential/src/utils/community-contracts-git-commit.ts create mode 100644 packages/core/confidential/src/utils/convert-strings.test.ts create mode 100644 packages/core/confidential/src/utils/convert-strings.ts create mode 100644 packages/core/confidential/src/utils/define-functions.ts create mode 100644 packages/core/confidential/src/utils/duration.ts create mode 100644 packages/core/confidential/src/utils/find-cover.ts create mode 100644 packages/core/confidential/src/utils/format-lines.ts create mode 100644 packages/core/confidential/src/utils/imports-libraries.ts create mode 100644 packages/core/confidential/src/utils/map-values.ts create mode 100644 packages/core/confidential/src/utils/sanitize.test.ts create mode 100644 packages/core/confidential/src/utils/sanitize.ts create mode 100644 packages/core/confidential/src/utils/sorted-by.ts create mode 100644 packages/core/confidential/src/utils/to-identifier.test.ts create mode 100644 packages/core/confidential/src/utils/to-identifier.ts create mode 100644 packages/core/confidential/src/utils/transitive-closure.ts create mode 100644 packages/core/confidential/src/utils/version.test.ts create mode 100644 packages/core/confidential/src/utils/version.ts create mode 100644 packages/core/confidential/src/zip-foundry.test.ts create mode 100644 packages/core/confidential/src/zip-foundry.test.ts.md create mode 100644 packages/core/confidential/src/zip-foundry.test.ts.snap create mode 100644 packages/core/confidential/src/zip-foundry.ts create mode 100644 packages/core/confidential/src/zip-hardhat.test.ts create mode 100644 packages/core/confidential/src/zip-hardhat.test.ts.md create mode 100644 packages/core/confidential/src/zip-hardhat.test.ts.snap create mode 100644 packages/core/confidential/src/zip-hardhat.ts create mode 100644 packages/core/confidential/tsconfig.json create mode 100644 packages/core/confidential/zip-env-foundry.js create mode 100644 packages/core/confidential/zip-env-foundry.ts create mode 100644 packages/core/confidential/zip-env-hardhat.js create mode 100644 packages/core/confidential/zip-env-hardhat.ts create mode 100644 packages/ui/public/zama.html create mode 100644 packages/ui/src/confidential/AccessControlSection.svelte create mode 100644 packages/ui/src/confidential/AccountControls.svelte create mode 100644 packages/ui/src/confidential/App.svelte create mode 100644 packages/ui/src/confidential/CustomControls.svelte create mode 100644 packages/ui/src/confidential/ERC1155Controls.svelte create mode 100644 packages/ui/src/confidential/ERC20Controls.svelte create mode 100644 packages/ui/src/confidential/ERC721Controls.svelte create mode 100644 packages/ui/src/confidential/GovernorControls.svelte create mode 100644 packages/ui/src/confidential/InfoSection.svelte create mode 100644 packages/ui/src/confidential/RealWorldAssetControls.svelte create mode 100644 packages/ui/src/confidential/StablecoinControls.svelte create mode 100644 packages/ui/src/confidential/UpgradeabilitySection.svelte create mode 100644 packages/ui/src/confidential/highlightjs.ts create mode 100644 packages/ui/src/confidential/inject-hyperlinks.ts create mode 100644 packages/ui/src/confidential/remix.ts create mode 100644 packages/ui/src/confidential/superchain-tooltip.ts diff --git a/packages/core/confidential/.gitignore b/packages/core/confidential/.gitignore new file mode 100644 index 000000000..017fefa2d --- /dev/null +++ b/packages/core/confidential/.gitignore @@ -0,0 +1,4 @@ +/cache +/artifacts +/contracts/generated +/openzeppelin-contracts.json diff --git a/packages/core/confidential/CHANGELOG.md b/packages/core/confidential/CHANGELOG.md new file mode 100644 index 000000000..4dc68c6ff --- /dev/null +++ b/packages/core/confidential/CHANGELOG.md @@ -0,0 +1,2 @@ +# Changelog + diff --git a/packages/core/confidential/LICENSE b/packages/core/confidential/LICENSE new file mode 100644 index 000000000..be3f7b28e --- /dev/null +++ b/packages/core/confidential/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/packages/core/confidential/NOTICE b/packages/core/confidential/NOTICE new file mode 100644 index 000000000..e68e93389 --- /dev/null +++ b/packages/core/confidential/NOTICE @@ -0,0 +1,8 @@ +OpenZeppelin Contracts Wizard +Copyright (C) 2021-2025 Zeppelin Group Ltd + +This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License along with this program. If not, see . \ No newline at end of file diff --git a/packages/core/confidential/README.md b/packages/core/confidential/README.md new file mode 100644 index 000000000..bb4177bbf --- /dev/null +++ b/packages/core/confidential/README.md @@ -0,0 +1,132 @@ +# OpenZeppelin Contracts Wizard for Solidity + +[![NPM Package](https://img.shields.io/npm/v/@openzeppelin/wizard?color=%234e5de4)](https://www.npmjs.com/package/@openzeppelin/wizard) + +Interactively build a contract out of components from OpenZeppelin Contracts. Provide parameters and desired features for the kind of contract that you want, and the Wizard will generate all of the code necessary. The resulting code is ready to be compiled and deployed, or it can serve as a starting point and customized further with application specific logic. + +This package provides a programmatic API. For a web interface, see https://wizard.openzeppelin.com + +### Installation + +`npm install @openzeppelin/wizard` + +### Contract types + +The following contract types are supported: +- `erc20` +- `erc721` +- `erc1155` +- `stablecoin` +- `realWorldAsset` +- `account` +- `governor` +- `custom` + +Note that `stablecoin`, `realWorldAsset`, and `account` are experimental and may be subject to change. + +Each contract type has functions/constants as defined below. + +### Functions + +#### `print` +```js +function print(opts?: ERC20Options): string +``` +```js +function print(opts?: ERC721Options): string +``` +```js +function print(opts?: ERC1155Options): string +``` +```js +function print(opts?: StablecoinOptions): string +``` +```js +function print(opts?: AccountOptions): string +``` +```js +function print(opts?: GovernorOptions): string +``` +```js +function print(opts?: CustomOptions): string +``` +Returns a string representation of a contract generated using the provided options. If `opts` is not provided, uses [`defaults`](#defaults). + +#### `defaults` +```js +const defaults: Required +``` +```js +const defaults: Required +``` +```js +const defaults: Required +``` +```js +const defaults: Required +``` +```js +const defaults: Required +``` +```js +const defaults: Required +``` +```js +const defaults: Required +``` +The default options that are used for [`print`](#print). + +#### `isAccessControlRequired` +```js +function isAccessControlRequired(opts: Partial): boolean +``` +```js +function isAccessControlRequired(opts: Partial): boolean +``` +```js +function isAccessControlRequired(opts: Partial): boolean +``` +```js +function isAccessControlRequired(opts: Partial): boolean +``` +```js +function isAccessControlRequired(opts: Partial): boolean +``` +```js +function isAccessControlRequired(opts: Partial): boolean +``` +Whether any of the provided options require access control to be enabled. If this returns `true`, then calling `print` with the same options would cause the `access` option to default to `'ownable'` if it was `undefined` or `false`. + +> Note that contracts such as `account`, have its own way of handling permissions and do not support the `access` option. +Thus, that type does not include `isAccessControlRequired`. + +### Examples + +Import the contract type(s) that you want to use from the `@openzeppelin/wizard` package: + +```js +import { erc20 } from '@openzeppelin/wizard'; +``` + +To generate the source code for an ERC20 contract with all of the default settings: +```js +const contract = erc20.print(); +``` + +To generate the source code for an ERC20 contract with a custom name and symbol, along with some custom settings: +```js +const contract = erc20.print({ + name: 'ExampleToken', + symbol: 'ETK', + burnable: true, + premint: '1000000', +}); +``` + +To generate the source code for an ERC20 contract with all of the defaults but is upgradeable using the UUPS proxy pattern: +```js +const contract = erc20.print({ + ...erc20.defaults, + upgradeable: 'uups', +}); +``` diff --git a/packages/core/confidential/ava.config.js b/packages/core/confidential/ava.config.js new file mode 100644 index 000000000..e39146f7a --- /dev/null +++ b/packages/core/confidential/ava.config.js @@ -0,0 +1,9 @@ +module.exports = { + extensions: ['ts'], + require: ['ts-node/register'], + watchmode: { + ignoreChanges: ['contracts', 'artifacts', 'cache'], + }, + timeout: '10m', + workerThreads: false, +}; diff --git a/packages/core/confidential/contracts/SafetyCheck.sol b/packages/core/confidential/contracts/SafetyCheck.sol new file mode 100644 index 000000000..97a7f1939 --- /dev/null +++ b/packages/core/confidential/contracts/SafetyCheck.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.2; + +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; + +// CAUTION +// In print.ts, we're assuming that some of the contracts do not have an init function. +// If Solidity complains about a missing "override" specifier in any of the functions below, +// we have to remove the corresponding exceptions from print.ts. + +abstract contract SafetyCheck0 is Initializable { + function __Initializable_init() public {} +} diff --git a/packages/core/confidential/get-imports.d.ts b/packages/core/confidential/get-imports.d.ts new file mode 100644 index 000000000..4c0a44175 --- /dev/null +++ b/packages/core/confidential/get-imports.d.ts @@ -0,0 +1 @@ +export * from './src/get-imports'; diff --git a/packages/core/confidential/get-imports.js b/packages/core/confidential/get-imports.js new file mode 100644 index 000000000..bc85ea526 --- /dev/null +++ b/packages/core/confidential/get-imports.js @@ -0,0 +1 @@ +module.exports = require('./dist/get-imports'); diff --git a/packages/core/confidential/hardhat.config.js b/packages/core/confidential/hardhat.config.js new file mode 100644 index 000000000..2ef5c7125 --- /dev/null +++ b/packages/core/confidential/hardhat.config.js @@ -0,0 +1,71 @@ +const fs = require('fs'); +const { task } = require('hardhat/config'); +const { HardhatError } = require('hardhat/internal/core/errors'); +const { ERRORS } = require('hardhat/internal/core/errors-list'); +const { + TASK_COMPILE_SOLIDITY_CHECK_ERRORS, + TASK_COMPILE_SOLIDITY_LOG_COMPILATION_ERRORS, + TASK_COMPILE_SOLIDITY_MERGE_COMPILATION_JOBS, + TASK_COMPILE_GET_REMAPPINGS, +} = require('hardhat/builtin-tasks/task-names'); +const SOLIDITY_VERSION = require('./src/solidity-version.json'); + +// Unused parameter warnings are caused by OpenZeppelin Upgradeable Contracts. +const WARN_UNUSED_PARAMETER = '5667'; +const WARN_CODE_SIZE = '5574'; +const IGNORED_WARNINGS = [WARN_UNUSED_PARAMETER, WARN_CODE_SIZE]; + +// Overriding this task so that warnings are considered errors. +task(TASK_COMPILE_SOLIDITY_CHECK_ERRORS, async ({ output, quiet }, { run }) => { + const errors = (output.errors && output.errors.filter(e => !IGNORED_WARNINGS.includes(e.errorCode))) || []; + + await run(TASK_COMPILE_SOLIDITY_LOG_COMPILATION_ERRORS, { + output: { ...output, errors }, + quiet, + }); + + if (errors.length > 0) { + throw new HardhatError(ERRORS.BUILTIN_TASKS.COMPILE_FAILURE); + } +}); + +task(TASK_COMPILE_SOLIDITY_MERGE_COMPILATION_JOBS, async ({ compilationJobs }, _, runSuper) => { + const CHUNK_SIZE = 100; + const chunks = []; + for (let i = 0; i < compilationJobs.length - 1; i += CHUNK_SIZE) { + chunks.push(compilationJobs.slice(i, i + CHUNK_SIZE)); + } + const mergedChunks = await Promise.all(chunks.map(cj => runSuper({ compilationJobs: cj }))); + return mergedChunks.flat(); +}); + +task(TASK_COMPILE_GET_REMAPPINGS).setAction((_, __, runSuper) => + runSuper().then(remappings => + Object.assign( + remappings, + Object.fromEntries( + fs + .readFileSync('remappings.txt', 'utf-8') + .split('\n') + .filter(Boolean) + .map(line => line.trim().split('=')), + ), + ), + ), +); + +/** + * @type import('hardhat/config').HardhatUserConfig + */ +module.exports = { + solidity: { + version: SOLIDITY_VERSION, + settings: { + evmVersion: 'cancun', + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, +}; diff --git a/packages/core/confidential/openzeppelin-contracts.d.ts b/packages/core/confidential/openzeppelin-contracts.d.ts new file mode 100644 index 000000000..5be5b07b3 --- /dev/null +++ b/packages/core/confidential/openzeppelin-contracts.d.ts @@ -0,0 +1,18 @@ +export interface OpenZeppelinContracts { + /** + * Version of `@openzeppelin/contracts` and `@openzeppelin/contracts-upgradeable` + */ + version: string; + /** + * Map of source file path to source code. + */ + sources: Record; + /** + * Map of source file path to the list of all source file paths it depends on (including transitive dependencies). + */ + dependencies: Record; +} + +declare const contracts: OpenZeppelinContracts; + +export default contracts; diff --git a/packages/core/confidential/package.json b/packages/core/confidential/package.json new file mode 100644 index 000000000..eb1857f4f --- /dev/null +++ b/packages/core/confidential/package.json @@ -0,0 +1,39 @@ +{ + "name": "@openzeppelin/wizard-zama", + "version": "0.0.1-alpha.0", + "description": "A boilerplate generator to get started with OpenZeppelin Contracts", + "license": "AGPL-3.0-only", + "repository": "https://github.com/OpenZeppelin/contracts-wizard", + "main": "dist/index.js", + "ts:main": "src/index.ts", + "files": [ + "LICENSE", + "NOTICE", + "/dist", + "/src", + "!**/*.test.*" + ], + "scripts": { + "prepare": "tsc && node dist/scripts/prepare.js", + "prepublish": "rimraf dist *.tsbuildinfo && hardhat clean", + "test": "ava", + "test:update-snapshots": "ava --update-snapshots", + "test:watch": "ava --watch", + "update-env": "rm ./src/environments/hardhat/package-lock.json && npm install --package-lock-only --prefix ./src/environments/hardhat && rm ./src/environments/hardhat/upgradeable/package-lock.json && npm install --package-lock-only --prefix ./src/environments/hardhat/upgradeable" + }, + "devDependencies": { + "@openzeppelin/community-contracts": "git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#de17c8e", + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0", + "@types/node": "^20.0.0", + "@types/semver": "^7.5.7", + "ava": "^6.0.0", + "hardhat": "^2.22.11", + "jszip": "^3.6.0", + "rimraf": "^5.0.0", + "semver": "^7.6.0", + "solidity-ast": "^0.4.18", + "ts-node": "^10.4.0", + "typescript": "^5.0.0" + } +} \ No newline at end of file diff --git a/packages/core/confidential/print-versioned.js b/packages/core/confidential/print-versioned.js new file mode 100644 index 000000000..2bc0b8aa3 --- /dev/null +++ b/packages/core/confidential/print-versioned.js @@ -0,0 +1 @@ +module.exports = require('./dist/print-versioned'); diff --git a/packages/core/confidential/print-versioned.ts b/packages/core/confidential/print-versioned.ts new file mode 100644 index 000000000..95629a774 --- /dev/null +++ b/packages/core/confidential/print-versioned.ts @@ -0,0 +1 @@ +export * from './src/print-versioned'; diff --git a/packages/core/confidential/remappings.txt b/packages/core/confidential/remappings.txt new file mode 100644 index 000000000..7f8667df0 --- /dev/null +++ b/packages/core/confidential/remappings.txt @@ -0,0 +1,2 @@ +@openzeppelin/community-contracts/=node_modules/@openzeppelin/community-contracts/contracts/ +@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ diff --git a/packages/core/confidential/src/account.test.ts b/packages/core/confidential/src/account.test.ts new file mode 100644 index 000000000..fbf809721 --- /dev/null +++ b/packages/core/confidential/src/account.test.ts @@ -0,0 +1,121 @@ +import test from 'ava'; +import { account } from '.'; + +import type { AccountOptions } from './account'; +import { buildAccount } from './account'; +import { printContract } from './print'; + +/** + * Tests external API for equivalence with internal API + */ +function testAPIEquivalence(title: string, opts?: AccountOptions) { + test(title, t => { + t.is( + account.print(opts), + printContract( + buildAccount({ + name: 'MyAccount', + signatureValidation: 'ERC7739', + ERC721Holder: true, + ERC1155Holder: true, + batchedExecution: false, + ERC7579Modules: false, + ...opts, + }), + ), + ); + }); +} + +function testAccount(title: string, opts: Partial) { + const fullOpts = { + name: 'MyAccount', + ERC1271: false as const, + ERC721Holder: false, + ERC1155Holder: false, + ERC7821: false as const, + ERC7579: false as const, + ...opts, + }; + test(title, t => { + const c = buildAccount(fullOpts); + t.snapshot(printContract(c)); + }); + testAPIEquivalence(`${title} API equivalence`, fullOpts); +} + +testAPIEquivalence('account API default'); + +test('account API assert defaults', async t => { + t.is(account.print(account.defaults), account.print()); +}); + +for (const signer of [false, 'ERC7702', 'ECDSA', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const) { + let title = 'Account'; + if (signer) { + title += ` with Signer${signer}`; + } + + testAccount(`${title} named`, { + name: `Custom${title}`, + signer, + }); + + testAccount(`${title} with ERC1271`, { + name: `Custom${title}ERC1271`, + signatureValidation: 'ERC1271', + signer, + }); + + testAccount(`${title} with ERC7739`, { + name: `Custom${title}ERC7739`, + signatureValidation: 'ERC7739', + signer, + }); + + testAccount(`${title} with ERC721Holder`, { + name: `Custom${title}ERC721Holder`, + ERC721Holder: true, + signer, + }); + + testAccount(`${title} with ERC1155Holder`, { + name: `Custom${title}ERC1155Holder`, + ERC1155Holder: true, + signer, + }); + + testAccount(`${title} with ERC721Holder and ERC1155Holder`, { + name: `Custom${title}ERC721HolderERC1155Holder`, + ERC721Holder: true, + ERC1155Holder: true, + signer, + }); + + testAccount(`${title} with ERC7821 Execution`, { + signer, + batchedExecution: true, + }); + + testAccount(`${title} with ERC7579`, { + signer, + ERC7579Modules: 'AccountERC7579', + }); + + testAccount(`${title} with ERC7579 with ERC1271`, { + signer, + ERC7579Modules: 'AccountERC7579', + signatureValidation: 'ERC1271', + }); + + testAccount(`${title} with ERC7579 with ERC7739`, { + signer, + ERC7579Modules: 'AccountERC7579', + signatureValidation: 'ERC7739', + }); + + testAccount(`${title} with ERC7579 hooks`, { + signer, + ERC7579Modules: 'AccountERC7579Hooked', + }); +} diff --git a/packages/core/confidential/src/account.test.ts.md b/packages/core/confidential/src/account.test.ts.md new file mode 100644 index 000000000..b3bec39c8 --- /dev/null +++ b/packages/core/confidential/src/account.test.ts.md @@ -0,0 +1,3485 @@ +# Snapshot report for `src/account.test.ts` + +The actual snapshot is saved in `account.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## Account named + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + ␊ + contract CustomAccount is Account, EIP712, ERC7739 {␊ + constructor() EIP712("CustomAccount", "1") {}␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + // Custom validation logic␊ + return false;␊ + }␊ + }␊ + ` + +## Account with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + ␊ + contract CustomAccountERC1271 is Account, IERC1271 {␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + // Custom validation logic␊ + return false;␊ + }␊ + }␊ + ` + +## Account with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + ␊ + contract CustomAccountERC7739 is Account, EIP712, ERC7739 {␊ + constructor() EIP712("CustomAccountERC7739", "1") {}␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + // Custom validation logic␊ + return false;␊ + }␊ + }␊ + ` + +## Account with ERC721Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + ␊ + contract CustomAccountERC721Holder is Account, EIP712, ERC7739, ERC721Holder {␊ + constructor() EIP712("CustomAccountERC721Holder", "1") {}␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + // Custom validation logic␊ + return false;␊ + }␊ + }␊ + ` + +## Account with ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + ␊ + contract CustomAccountERC1155Holder is Account, EIP712, ERC7739, ERC1155Holder {␊ + constructor() EIP712("CustomAccountERC1155Holder", "1") {}␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + // Custom validation logic␊ + return false;␊ + }␊ + }␊ + ` + +## Account with ERC721Holder and ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + ␊ + contract CustomAccountERC721HolderERC1155Holder is Account, EIP712, ERC7739, ERC721Holder, ERC1155Holder {␊ + constructor() EIP712("CustomAccountERC721HolderERC1155Holder", "1") {}␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + // Custom validation logic␊ + return false;␊ + }␊ + }␊ + ` + +## Account with ERC7821 Execution + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/community-contracts/account/extensions/ERC7821.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, ERC7821 {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + ␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + // Custom validation logic␊ + return false;␊ + }␊ + }␊ + ` + +## Account with ERC7579 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579 {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + }␊ + ` + +## Account with ERC7579 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + contract MyAccount is Account, IERC1271, AccountERC7579 {␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + }␊ + ` + +## Account with ERC7579 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579 {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + }␊ + ` + +## Account with ERC7579 hooks + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + }␊ + ` + +## Account with SignerERC7702 named + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract CustomAccountWithSignerERC7702 is Account, EIP712, ERC7739, SignerERC7702 {␊ + constructor() EIP712("CustomAccount with SignerERC7702", "1") {}␊ + }␊ + ` + +## Account with SignerERC7702 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract CustomAccountWithSignerERC7702ERC1271 is Account, IERC1271, SignerERC7702 {␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + }␊ + ` + +## Account with SignerERC7702 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract CustomAccountWithSignerERC7702ERC7739 is Account, EIP712, ERC7739, SignerERC7702 {␊ + constructor() EIP712("CustomAccount with SignerERC7702ERC7739", "1") {}␊ + }␊ + ` + +## Account with SignerERC7702 with ERC721Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract CustomAccountWithSignerERC7702ERC721Holder is Account, EIP712, ERC7739, SignerERC7702, ERC721Holder {␊ + constructor() EIP712("CustomAccount with SignerERC7702ERC721Holder", "1") {}␊ + }␊ + ` + +## Account with SignerERC7702 with ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract CustomAccountWithSignerERC7702ERC1155Holder is Account, EIP712, ERC7739, SignerERC7702, ERC1155Holder {␊ + constructor() EIP712("CustomAccount with SignerERC7702ERC1155Holder", "1") {}␊ + }␊ + ` + +## Account with SignerERC7702 with ERC721Holder and ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract CustomAccountWithSignerERC7702ERC721HolderERC1155Holder is Account, EIP712, ERC7739, SignerERC7702, ERC721Holder, ERC1155Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerERC7702ERC721HolderERC1155Holder", "1")␊ + {}␊ + }␊ + ` + +## Account with SignerERC7702 with ERC7821 Execution + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/community-contracts/account/extensions/ERC7821.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, SignerERC7702, ERC7821 {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerERC7702 with ERC7579 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerERC7702 {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerERC7702 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerERC7702)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerERC7702, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerERC7702 with ERC7579 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract MyAccount is Account, IERC1271, AccountERC7579, SignerERC7702 {␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerERC7702 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerERC7702)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerERC7702, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerERC7702 with ERC7579 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579, SignerERC7702 {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerERC7702 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerERC7702)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerERC7702, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerERC7702 with ERC7579 hooks + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerERC7702} from "@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol";␊ + ␊ + contract MyAccount is Account, EIP712, ERC7739, AccountERC7579Hooked, SignerERC7702 {␊ + constructor() EIP712("MyAccount", "1") {}␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerERC7702 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerERC7702)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerERC7702, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA named + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerECDSA is Initializable, Account, EIP712, ERC7739, SignerECDSA {␊ + constructor() EIP712("CustomAccount with SignerECDSA", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerECDSAERC1271 is Initializable, Account, IERC1271, SignerECDSA {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerECDSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerECDSA {␊ + constructor() EIP712("CustomAccount with SignerECDSAERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC721Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerECDSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerECDSA, ERC721Holder {␊ + constructor() EIP712("CustomAccount with SignerECDSAERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerECDSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerECDSA, ERC1155Holder {␊ + constructor() EIP712("CustomAccount with SignerECDSAERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC721Holder and ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerECDSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerECDSA, ERC721Holder, ERC1155Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerECDSAERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC7821 Execution + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/community-contracts/account/extensions/ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerECDSA, ERC7821 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC7579 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, SignerECDSA {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerECDSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerECDSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerECDSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC7579 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579, SignerECDSA {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerECDSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerECDSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerECDSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC7579 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, SignerECDSA {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerECDSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerECDSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerECDSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerECDSA with ERC7579 hooks + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerECDSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Hooked, SignerECDSA {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeECDSA(address signer) public initializer {␊ + _setSigner(signer);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerECDSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerECDSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerECDSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerP256 named + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerP256 is Initializable, Account, EIP712, ERC7739, SignerP256 {␊ + constructor() EIP712("CustomAccount with SignerP256", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerP256ERC1271 is Initializable, Account, IERC1271, SignerP256 {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerP256ERC7739 is Initializable, Account, EIP712, ERC7739, SignerP256 {␊ + constructor() EIP712("CustomAccount with SignerP256ERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC721Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerP256ERC721Holder is Initializable, Account, EIP712, ERC7739, SignerP256, ERC721Holder {␊ + constructor() EIP712("CustomAccount with SignerP256ERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerP256ERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256, ERC1155Holder {␊ + constructor() EIP712("CustomAccount with SignerP256ERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC721Holder and ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerP256ERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerP256, ERC721Holder, ERC1155Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerP256ERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC7821 Execution + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/community-contracts/account/extensions/ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerP256, ERC7821 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC7579 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerP256 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC7579 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579, SignerP256 {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerP256 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC7579 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, SignerP256 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerP256 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerP256 with ERC7579 hooks + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerP256} from "@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Hooked, SignerP256 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeP256(bytes32 qx, bytes32 qy) public initializer {␊ + _setSigner(qx, qy);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerP256 is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerP256)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerP256, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA named + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerRSA is Initializable, Account, EIP712, ERC7739, SignerRSA {␊ + constructor() EIP712("CustomAccount with SignerRSA", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerRSAERC1271 is Initializable, Account, IERC1271, SignerRSA {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerRSAERC7739 is Initializable, Account, EIP712, ERC7739, SignerRSA {␊ + constructor() EIP712("CustomAccount with SignerRSAERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC721Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerRSAERC721Holder is Initializable, Account, EIP712, ERC7739, SignerRSA, ERC721Holder {␊ + constructor() EIP712("CustomAccount with SignerRSAERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerRSAERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSA, ERC1155Holder {␊ + constructor() EIP712("CustomAccount with SignerRSAERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC721Holder and ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerRSAERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, SignerRSA, ERC721Holder, ERC1155Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerRSAERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7821 Execution + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/community-contracts/account/extensions/ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, SignerRSA, ERC7821 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579, SignerRSA {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, SignerRSA {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerRSA with ERC7579 hooks + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + import {SignerRSA} from "@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Hooked, SignerRSA {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeRSA(bytes memory e, bytes memory n) public initializer {␊ + _setSigner(e, n);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerRSA is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerRSA)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(SignerRSA, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig named + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisig is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913 {␊ + constructor() EIP712("CustomAccount with SignerMultisig", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913 {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913 {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC7739", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC721Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC721Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913, ERC1155Holder {␊ + constructor() EIP712("CustomAccount with SignerMultisigERC1155Holder", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC721Holder and ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913, ERC721Holder, ERC1155Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC7821 Execution + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/community-contracts/account/extensions/ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913, ERC7821 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC7579 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC7579 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579, MultiSignerERC7913 {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC7579 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisig with ERC7579 hooks + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeMultisig(bytes[] memory signers, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisig is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisig)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted named + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigWeighted is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ + constructor() EIP712("CustomAccount with SignerMultisigWeighted", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigWeightedERC1271 is Initializable, Account, IERC1271, MultiSignerERC7913Weighted {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override␊ + returns (bytes4)␊ + {␊ + return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigWeightedERC7739 is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Weighted {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC7739", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC721Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigWeightedERC721Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigWeightedERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC1155Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC721Holder and ERC1155Holder + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC1155Holder} from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";␊ + import {ERC721Holder} from "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract CustomAccountWithSignerMultisigWeightedERC721HolderERC1155Holder is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC721Holder, ERC1155Holder {␊ + constructor()␊ + EIP712("CustomAccount with SignerMultisigWeightedERC721HolderERC1155Holder", "1")␊ + {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC7821 Execution + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {ERC7821} from "@openzeppelin/community-contracts/account/extensions/ERC7821.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, MultiSignerERC7913Weighted, ERC7821 {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function _erc7821AuthorizedExecutor(address caller, bytes32 mode, bytes calldata executionData)␊ + internal␊ + view␊ + override␊ + returns (bool)␊ + {␊ + return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC7579 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC7579 with ERC1271 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {IERC1271} from "@openzeppelin/contracts/interfaces/IERC1271.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, IERC1271, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(IERC1271, AccountERC7579)␊ + returns (bytes4)␊ + {␊ + return super.isValidSignature(hash, signature);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC7579 with ERC7739 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579, MultiSignerERC7913Weighted {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` + +## Account with SignerMultisigWeighted with ERC7579 hooks + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AbstractSigner} from "@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol";␊ + import {Account} from "@openzeppelin/community-contracts/account/Account.sol";␊ + import {AccountERC7579} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol";␊ + import {AccountERC7579Hooked} from "@openzeppelin/community-contracts/account/extensions/AccountERC7579Hooked.sol";␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC7739} from "@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol";␊ + import {Initializable} from "@openzeppelin/contracts/proxy/utils/Initializable.sol";␊ + import {MultiSignerERC7913} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol";␊ + import {MultiSignerERC7913Weighted} from "@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol";␊ + import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol";␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + contract MyAccount is Initializable, Account, EIP712, ERC7739, AccountERC7579Hooked, MultiSignerERC7913Weighted {␊ + constructor() EIP712("MyAccount", "1") {␊ + _disableInitializers();␊ + }␊ + ␊ + function isValidSignature(bytes32 hash, bytes calldata signature)␊ + public␊ + view␊ + override(AccountERC7579, ERC7739)␊ + returns (bytes4)␊ + {␊ + // ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).␊ + // If the returned value is 0xffffffff, fallback to ERC-7579 validation.␊ + bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);␊ + return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;␊ + }␊ + ␊ + function initializeMultisigWeighted(bytes[] memory signers, uint256[] memory weights, uint256 threshold)␊ + public␊ + initializer␊ + {␊ + _addSigners(signers);␊ + _setSignerWeights(signers, weights);␊ + _setThreshold(threshold);␊ + }␊ + ␊ + function setSignerWeights(bytes[] memory signers, uint256[] memory weights)␊ + public␊ + onlyEntryPointOrSelf␊ + {␊ + _setSignerWeights(signers, weights);␊ + }␊ + ␊ + function addSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _addSigners(signers);␊ + }␊ + ␊ + function removeSigners(bytes[] memory signers) public onlyEntryPointOrSelf {␊ + _removeSigners(signers);␊ + }␊ + ␊ + function setThreshold(uint256 threshold) public onlyEntryPointOrSelf {␊ + _setThreshold(threshold);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _validateUserOp(PackedUserOperation calldata userOp, bytes32 userOpHash)␊ + internal␊ + override(Account, AccountERC7579)␊ + returns (uint256)␊ + {␊ + return super._validateUserOp(userOp, userOpHash);␊ + }␊ + ␊ + // IMPORTANT: Make sure SignerMultisigWeighted is most derived than AccountERC7579␊ + // in the inheritance chain (i.e. contract ... is AccountERC7579, ..., SignerMultisigWeighted)␊ + // to ensure the correct order of function resolution.␊ + // AccountERC7579 returns false for \`_rawSignatureValidation\`␊ + function _rawSignatureValidation(bytes32 hash, bytes calldata signature)␊ + internal␊ + view␊ + override(MultiSignerERC7913, AbstractSigner, AccountERC7579)␊ + returns (bool)␊ + {␊ + return super._rawSignatureValidation(hash, signature);␊ + }␊ + }␊ + ` diff --git a/packages/core/confidential/src/account.test.ts.snap b/packages/core/confidential/src/account.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..80eddb0a2f0d4ac8cdfc73922908353cd6d6f860 GIT binary patch literal 4740 zcmV-~5_|1IRzVPkuNcEU%p8 zDv3qFV;_qM00000000B+U0ZA%R~c^W#7<0FiHn5Fr8-GlbxrMEU*b4*2&qY}HliVB z9a?Ci?RfXtJ9u|yGc%jmNh49Iydm*W9x9MPEf2s0mx2JHB2*!eP(ecC5hNrY5lBdg z2QCsqGqW?hXZFl(XJ+@z&ex~L_MADhd;ahH{&W8So7Z-CnrdxdfA#X~)R2uPZEe(Q zYDY1MBDH8;))lF(H&jD^>9u-YGNe!6^~b3@X6`WmyYuKB@4V}`cU3B6d+V`JEj%gL zsG`$_OLeLk@~%v^b#nRA)!9mgTvS_a$&h!Nl-!Vw2D#Fv$}_axrcGHP7gfd3q?)0V z=T^(7%Zo%(>gE-#jv^a}eZQ`$t(I(%I$c_;ou#vFP1}~Td6sBSg1L7s7Uq&mF|UQU2UE^=MJ}dX=`n1 z*>5ywjE*5U^-4`UY#ZvHCbb)f75hT(Xw{2rYb%dLpB!&sdyMYLv(Dd=iyhri-7iws zN%w!}i9MBh(!G-0nk9sgnyToA)~Ok)R+{VnP3aUf%BgvBYU$J*xpjNix@5Pb)C^fw z$n%>q&Mb?^)FJBnoV;N5#709&Kk`8PgV@7 zDN@t@!F8G5aQ~rRrA?oNm_)jhf9xt{Dw zO`V>zetLWM_G~u>4CkY>R_kW<;?nZk(qJe|J;j8=<5PtRg-hMfBrF)LFLhU{QN7|^ z61-Tuf5fa==gRIE?5;dnx0ai`_+l@)c4w#Aw0G9 zviCX4I&D%j7RkE(5T{Fv2fN+>=A6Y^z$i2ki$h3%VWRL4ASA&F$>E+Kp#C0#Drlfi5HH7r1NX8d;K09kv4G;f0iZa$yhJt+Xsu(8HHZyI zo@21#$`N3LAX#Vs$Y+;*x2XIdn;sZc(PdS!(c$d!;GWgx!w8$J^X@tdibi)R|A3=f z%^YTDDvzDeu$x>U82RIh7Px8uwN0Vf7qYMl`Xl!*Y z28?imogFHtsJA86_G$f-I@PYUsb;OW7@PEUP1-dU%$@1eD=TZm!XEoUCPcrH?DCh` zDZ9@y$BA<8_J5^fUb0~AUDhPU32LK3t)E-R7cFT|u9-N{q4T7-qfbh*Vu8aPQ8lu7 zV2-i4xVS`0b!t%SLzpY~-{{h=HLiUNTDM0uzmeXU^Cp}$ccj`rF;shI<~Py9px%J? z^AHn=*H#{}=XlXO9of((G|4M~iZBVkSHk;}V zS=n=!j!qGpvqnj>3&4ij-V1JoO+9`WBs_ty7s@Hkn~0X znRu6+H(WSNt|KeP^6D8Mvh6adXX4J>`sOsKdQbA$CFIca$TJMpe5^RacT`l9{BU)Q zWZ=xihXoLMU>Nu#skdPm}q=vq~IEbr)8tTuAe}jVE;67H3Day_VGqieN4GAuA1~2rXNTe+W9RMkJuhgO!AZEFaOgd@j=oifgLfRfrMhuyK63;8<5Tp4Mo z6muL$qf{yt@@UN}_FY$RE_B*^npCIyLPyc1UAiEdJkT#U!mF6A^(*Uyd7$|K+0%dB zaIFaDrLN|2gY@~jtef|CCqgy7PVS6Y(dD<6@cKsWM{H9KEj%-7ho;y3&1Pa>ytvbUV9nh{HeJoBBC}INyWD zfW{CM&zz3^5lf9tPxHQ*isM7!@$YXUP+Zvo69K@B6Xg9S2E$-XDvk!;$p{WR4~Hi@ z0lnQv&M>(15O7D(-floowwW5!^*uE9BsO^%n2zA+^Wo^CCyLd?kzX)y^h3arpl}3@ zl~bVex4K9!xYG5#2%IqEdLbq>R>Gk%#C_xFyBRb*aujGN*v`;qX6_rs0W79iXLt~b zZw4X~YOQr5gp~BR>HR?-k2f4R8d86D>=j0yzI+VwG^g@Z z@OnB3$iRZUxXMwy-2~7+Ol^{w+Cbqz;UrTy{CZbxz)gz6!3G@k6E@(m0f!AZC~<7S zL7t9Vo`#n~2f6#qzRl>;H=#@Os!QSS11&7P7WUW;K@md{LlHv}LlHv}r>BTN$Wg>w z%d2O6{f>UXXy9+ai=Yttt+y~z&{*a$nYFQ4i#L9qxOLf39eL)JX;qAyW4RD??Vv|O z*AAo8sd?SCLr$ze;1}y5hDR$*$Ujh=mOH@){czs5WVsZ%ABfppwIIoF$8b5y1BLOf6#z#;Y zIYqP~U5}E8jg&o)MiBp{u=t1X5qysTFFbfjV0u(F4VII89(g8`BiP~jtud(%Y>)D9 zGXm(zDpyP5{^4LxQp+RnRC0tq>rq7yT#qIQj-at}2Xv`f9t{YtR2`3kCYz?=(FmY% zAq*PBOpoqm&~O%}N22Wv<AizpudE~;-$Q_R|gAUK3J#3FcZI42?-1)9Yc-{Pj z6u0JuDDqiontP_;w_JstN}#?J^`&E~FU?k3pvW}+BGc-)Ua(ok>ox5hK%@%O#Rz&d z%=73KMx4G3&!fDGQ^9NMARl8o9;IBS2htaq^x=90eFJ@yOyBr89%1usLi7zb-=Lnb z`G(CmY`!@Q6gnK6ZxE;B5~pE>(1CtOZ!@a&O{mhms#5qJK?w`3gju&E=waw#=waw# z=wayLl=bjQjvl_;X&SOF@A-Ki9es(>!5V7L3!&kxWnr%n^RAC9tt6WH;Bc8Wx3~*B zjvyPH-*A0<&dt-REO*AUf$G`MIz+2mchl!dmr{t)(5T)}n{{7-*2l;mba`H?*X`-+ zrS8Ce`orYxtIp`9-hKE}?;DCgWmh4nO7n2jtp>lMZPVs%q)B;isnM2tou+hGcCg?Z zGat<07ZLTAA)jxsorJsEgKLP6{*OWNzZVC^1+TfuKhDOow~C0f0;jYw>o3Oda|H?k zg~X!}ewoJ6FEJGI`QlIr5`nxERBX4hwDW@fk907x0;*2lL7XB0N7zQ z2g(@Efo^cFX;{(mrUfbim84E3?-V3gDuJDKacEO4Twlbn0pPMuP4@cP`y6 zN20qBo6qS#F%0)RFq~*7EjhFK%mE1vS4Z#1DkFCQ1ql?M1lW7Rt2NxKHCizO*Rb_O ziJ{1QPY6tr=+1*@#F&XW!_K_1yGX<=)j<0k+ULg9J_nHqkx0Ie+-(LV7ylXAR* zlq0Vx2Yj@V=Hx8Rah$c0>>$}evV&v?$qteoBs)lUV!SWN`P!bQ@?OKBbw8i<>F+Xm z&ezejS5S@aER>YBx-)F%{od|EPu7U%4wJ~B#2F>+K0RmLFqzf+%?;~{kqI#SxArvM zznOPtF|=A67&-3q`#vmB^mv~->T^M3j;>>!_X6huCLOLnr zl+biOkemeG?1{RkBb@m>_!fK%zKzYd{3^cbUo(9BQ>2s<6Hs_}FiUViJ@K+rqqhZgh z55UFXVsLTlTzn?hhH!vU_spXV883m11vTmhAB(}qsab0?gq*giHh03HWKc3FIV(zj ze5mv|%F8rn-eNfV4RExe9F1&z(%CV5ya3PYOsQU6~vgWAfVi#+zYSV;fIl(A4Y%2_xOA< zoLRshV^36njPr3b!jQ({6UUhJ@Zax1dYIGnFn5j6NZ1M#wObVPu?P@U0SX05vHY1`eQ*zlfZ_-~b8-P&j}>CX7rNnJ_Y8q=!fk zGe{3(c@qS^mFk`gOkTKn5AwpC=7o4G6>?GJqA9%<3mGXgQe>pAWHh%{;Ke!m5&{7J8A5&l literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/account.ts b/packages/core/confidential/src/account.ts new file mode 100644 index 000000000..da79a0809 --- /dev/null +++ b/packages/core/confidential/src/account.ts @@ -0,0 +1,296 @@ +import { ContractBuilder } from './contract'; +import type { Contract } from './contract'; +import { defineFunctions } from './utils/define-functions'; +import { printContract } from './print'; +import { defaults as commonDefaults, withCommonDefaults, type CommonOptions } from './common-options'; +import { setInfo } from './set-info'; +import { addSigner, signerFunctions, signers, type SignerOptions } from './signer'; + +export const defaults: Required = { + ...commonDefaults, + name: 'MyAccount', + signatureValidation: 'ERC7739', + ERC721Holder: true, + ERC1155Holder: true, + signer: 'ECDSA', + batchedExecution: false, + ERC7579Modules: false, +} as const; + +export const SignatureValidationOptions = [false, 'ERC1271', 'ERC7739'] as const; +export type SignatureValidationOptions = (typeof SignatureValidationOptions)[number]; + +export const ERC7579ModulesOptions = [false, 'AccountERC7579', 'AccountERC7579Hooked'] as const; +export type ERC7579ModulesOptions = (typeof ERC7579ModulesOptions)[number]; + +export interface AccountOptions extends CommonOptions { + name: string; + signatureValidation?: SignatureValidationOptions; + ERC721Holder?: boolean; + ERC1155Holder?: boolean; + signer?: SignerOptions; + batchedExecution?: boolean; + ERC7579Modules?: ERC7579ModulesOptions; +} + +function withDefaults(opts: AccountOptions): Required { + return { + ...withCommonDefaults(opts), + name: opts.name ?? defaults.name, + signatureValidation: opts.signatureValidation ?? defaults.signatureValidation, + ERC721Holder: opts.ERC721Holder ?? defaults.ERC721Holder, + ERC1155Holder: opts.ERC1155Holder ?? defaults.ERC1155Holder, + signer: opts.signer ?? defaults.signer, + batchedExecution: opts.batchedExecution ?? defaults.batchedExecution, + ERC7579Modules: opts.ERC7579Modules ?? defaults.ERC7579Modules, + }; +} + +export function printAccount(opts: AccountOptions = defaults): string { + return printContract(buildAccount(opts)); +} + +export function buildAccount(opts: AccountOptions): Contract { + const allOpts = withDefaults(opts); + + allOpts.upgradeable = false; // Upgradeability is not yet available for the community contracts + allOpts.access = false; // Access control options are not used for Account + + const c = new ContractBuilder(allOpts.name); + + addParents(c, allOpts); + overrideRawSignatureValidation(c, allOpts); + setInfo(c, allOpts.info); + + if (opts.ERC7579Modules) { + c.addImportOnly({ + name: 'PackedUserOperation', + path: '@openzeppelin/contracts/interfaces/draft-IERC4337.sol', + }); + } + + return c; +} + +function addParents(c: ContractBuilder, opts: AccountOptions): void { + // Base + c.addParent({ + name: 'Account', + path: `@openzeppelin/community-contracts/account/Account.sol`, + }); + c.addOverride({ name: 'Account' }, functions._validateUserOp); + + if (opts.signatureValidation === 'ERC7739') addEIP712(c, opts); + + // Extensions + addSignatureValidation(c, opts); + addERC7579Modules(c, opts); + addSigner(c, opts.signer ?? false); + addMultisigFunctions(c, opts); + addBatchedExecution(c, opts); + addERC721Holder(c, opts); + addERC1155Holder(c, opts); +} + +function addSignatureValidation(c: ContractBuilder, opts: AccountOptions) { + switch (opts.signatureValidation) { + case 'ERC7739': + c.addParent({ + name: 'ERC7739', + path: '@openzeppelin/community-contracts/utils/cryptography/ERC7739.sol', + }); + break; + case 'ERC1271': + c.addParent({ + name: 'IERC1271', + path: '@openzeppelin/contracts/interfaces/IERC1271.sol', + }); + c.addOverride({ name: 'IERC1271' }, functions.isValidSignature); + if (!opts.ERC7579Modules) { + c.setFunctionBody( + [ + 'return _rawSignatureValidation(hash, signature) ? IERC1271.isValidSignature.selector : bytes4(0xffffffff);', + ], + functions.isValidSignature, + ); + } + break; + } +} + +function addERC721Holder(c: ContractBuilder, opts: AccountOptions): void { + if (!opts.ERC721Holder) return; + c.addParent({ + name: 'ERC721Holder', + path: '@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol', + }); +} + +function addERC1155Holder(c: ContractBuilder, opts: AccountOptions): void { + if (!opts.ERC1155Holder) return; + c.addParent({ + name: 'ERC1155Holder', + path: '@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol', + }); +} + +function addBatchedExecution(c: ContractBuilder, opts: AccountOptions): void { + // ERC-7579 is a superset of ERC-7821 + if (!opts.batchedExecution || !!opts.ERC7579Modules) return; + c.addParent({ + name: 'ERC7821', + path: '@openzeppelin/community-contracts/account/extensions/ERC7821.sol', + }); + c.addOverride({ name: 'ERC7821' }, functions._erc7821AuthorizedExecutor); + c.setFunctionBody( + ['return caller == address(entryPoint()) || super._erc7821AuthorizedExecutor(caller, mode, executionData);'], + functions._erc7821AuthorizedExecutor, + ); +} + +function addERC7579Modules(c: ContractBuilder, opts: AccountOptions): void { + if (!opts.ERC7579Modules) return; + c.addParent({ + name: opts.ERC7579Modules, + path: `@openzeppelin/community-contracts/account/extensions/${opts.ERC7579Modules}.sol`, + }); + if (opts.ERC7579Modules !== 'AccountERC7579') { + c.addImportOnly({ + name: 'AccountERC7579', + path: `@openzeppelin/community-contracts/account/extensions/AccountERC7579.sol`, + }); + } + c.addOverride({ name: 'AccountERC7579' }, functions.isValidSignature); + c.addOverride({ name: 'AccountERC7579' }, functions._validateUserOp); + + if (opts.signatureValidation !== 'ERC7739') return; + c.addOverride({ name: 'ERC7739' }, functions.isValidSignature); + c.setFunctionBody( + [ + '// ERC-7739 can return the ERC-1271 magic value, 0xffffffff (invalid) or 0x77390001 (detection).', + '// If the returned value is 0xffffffff, fallback to ERC-7579 validation.', + 'bytes4 erc7739magic = ERC7739.isValidSignature(hash, signature);', + 'return erc7739magic == bytes4(0xffffffff) ? AccountERC7579.isValidSignature(hash, signature) : erc7739magic;', + ], + functions.isValidSignature, + ); +} + +function addMultisigFunctions(c: ContractBuilder, opts: AccountOptions): void { + switch (opts.signer) { + case 'MultisigWeighted': + c.addFunctionCode( + `_setSignerWeights(${functions.setSignerWeights.args.map(({ name }) => name).join(', ')});`, + functions.setSignerWeights, + ); + c.addModifier('onlyEntryPointOrSelf', functions.setSignerWeights); + // eslint-disable-next-line no-fallthrough + case 'Multisig': + c.addFunctionCode(`_addSigners(${functions.addSigners.args[0]!.name});`, functions.addSigners); + c.addModifier('onlyEntryPointOrSelf', functions.addSigners); + c.addFunctionCode(`_removeSigners(${functions.removeSigners.args[0]!.name});`, functions.removeSigners); + c.addModifier('onlyEntryPointOrSelf', functions.removeSigners); + c.addFunctionCode(`_setThreshold(${functions.setThreshold.args[0]!.name});`, functions.setThreshold); + c.addModifier('onlyEntryPointOrSelf', functions.setThreshold); + break; + default: + } +} + +function addEIP712(c: ContractBuilder, opts: AccountOptions): void { + if (opts.signatureValidation != 'ERC7739') return; + c.addParent( + { + name: 'EIP712', + path: '@openzeppelin/contracts/utils/cryptography/EIP712.sol', + }, + [opts.name, '1'], + ); +} + +function overrideRawSignatureValidation(c: ContractBuilder, opts: AccountOptions): void { + if (opts.signer && !opts.ERC7579Modules) return; // Signer implements _rawSignatureValidation alone + if (!opts.signer && opts.ERC7579Modules) return; // AccountERC7579 implements _rawSignatureValidation alone + + // If no signer or ERC-7579 is used, we need to override the _rawSignatureValidation function + // to provide a custom validation logic + if (!opts.signer && !opts.ERC7579Modules) { + // Custom validation logic + c.addOverride({ name: 'Account' }, signerFunctions._rawSignatureValidation); + c.setFunctionBody(['// Custom validation logic', 'return false;'], signerFunctions._rawSignatureValidation); + } + + // Disambiguate between Signer and AccountERC7579 + if (opts.signer && opts.ERC7579Modules) { + c.addImportOnly({ + name: 'AbstractSigner', + path: '@openzeppelin/community-contracts/utils/cryptography/AbstractSigner.sol', + }); + c.addOverride({ name: 'AbstractSigner' }, signerFunctions._rawSignatureValidation); + c.addOverride({ name: 'AccountERC7579' }, signerFunctions._rawSignatureValidation); + c.setFunctionComments( + [ + `// IMPORTANT: Make sure Signer${opts.signer} is most derived than AccountERC7579`, + `// in the inheritance chain (i.e. contract ... is AccountERC7579, ..., Signer${opts.signer})`, + '// to ensure the correct order of function resolution.', + '// AccountERC7579 returns false for `_rawSignatureValidation`', + ], + signerFunctions._rawSignatureValidation, + ); + // Base override for `_rawSignatureValidation` given MultiSignerERC7913Weighted is MultiSignerERC7913 + if (opts.signer === 'MultisigWeighted') { + c.addImportOnly(signers.Multisig); + } + } +} + +const functions = { + ...defineFunctions({ + isValidSignature: { + kind: 'public' as const, + mutability: 'view' as const, + args: [ + { name: 'hash', type: 'bytes32' }, + { name: 'signature', type: 'bytes calldata' }, + ], + returns: ['bytes4'], + }, + _validateUserOp: { + kind: 'internal' as const, + args: [ + { name: 'userOp', type: 'PackedUserOperation calldata' }, + { name: 'userOpHash', type: 'bytes32' }, + ], + returns: ['uint256'], + }, + _erc7821AuthorizedExecutor: { + kind: 'internal' as const, + args: [ + { name: 'caller', type: 'address' }, + { name: 'mode', type: 'bytes32' }, + { name: 'executionData', type: 'bytes calldata' }, + ], + returns: ['bool'], + mutability: 'view' as const, + }, + addSigners: { + kind: 'public' as const, + args: [{ name: 'signers', type: 'bytes[] memory' }], + }, + removeSigners: { + kind: 'public' as const, + args: [{ name: 'signers', type: 'bytes[] memory' }], + }, + setThreshold: { + kind: 'public' as const, + args: [{ name: 'threshold', type: 'uint256' }], + }, + setSignerWeights: { + kind: 'public' as const, + args: [ + { name: 'signers', type: 'bytes[] memory' }, + { name: 'weights', type: 'uint256[] memory' }, + ], + }, + }), +}; diff --git a/packages/core/confidential/src/add-pausable.ts b/packages/core/confidential/src/add-pausable.ts new file mode 100644 index 000000000..12fe36288 --- /dev/null +++ b/packages/core/confidential/src/add-pausable.ts @@ -0,0 +1,37 @@ +import type { ContractBuilder, BaseFunction } from './contract'; +import type { Access } from './set-access-control'; +import { requireAccessControl } from './set-access-control'; +import { defineFunctions } from './utils/define-functions'; + +export function addPausable(c: ContractBuilder, access: Access, pausableFns: BaseFunction[]) { + c.addParent({ + name: 'Pausable', + path: '@openzeppelin/contracts/utils/Pausable.sol', + }); + + for (const fn of pausableFns) { + c.addModifier('whenNotPaused', fn); + } + + addPauseFunctions(c, access); +} + +export function addPauseFunctions(c: ContractBuilder, access: Access) { + requireAccessControl(c, functions.pause, access, 'PAUSER', 'pauser'); + c.addFunctionCode('_pause();', functions.pause); + + requireAccessControl(c, functions.unpause, access, 'PAUSER', 'pauser'); + c.addFunctionCode('_unpause();', functions.unpause); +} + +const functions = defineFunctions({ + pause: { + kind: 'public' as const, + args: [], + }, + + unpause: { + kind: 'public' as const, + args: [], + }, +}); diff --git a/packages/core/confidential/src/api.ts b/packages/core/confidential/src/api.ts new file mode 100644 index 000000000..15e0532f8 --- /dev/null +++ b/packages/core/confidential/src/api.ts @@ -0,0 +1,108 @@ +import type { CommonOptions } from './common-options'; +import type { ERC20Options } from './erc20'; +import { + printERC20, + defaults as erc20defaults, + isAccessControlRequired as erc20IsAccessControlRequired, +} from './erc20'; +import type { ERC721Options } from './erc721'; +import { + printERC721, + defaults as erc721defaults, + isAccessControlRequired as erc721IsAccessControlRequired, +} from './erc721'; +import type { ERC1155Options } from './erc1155'; +import { + printERC1155, + defaults as erc1155defaults, + isAccessControlRequired as erc1155IsAccessControlRequired, +} from './erc1155'; +import type { StablecoinOptions } from './stablecoin'; +import { + printStablecoin, + defaults as stablecoinDefaults, + isAccessControlRequired as stablecoinIsAccessControlRequired, +} from './stablecoin'; +import type { AccountOptions } from './account'; +import { printAccount, defaults as accountDefaults } from './account'; +import type { GovernorOptions } from './governor'; +import { + printGovernor, + defaults as governorDefaults, + isAccessControlRequired as governorIsAccessControlRequired, +} from './governor'; +import type { CustomOptions } from './custom'; +import { + printCustom, + defaults as customDefaults, + isAccessControlRequired as customIsAccessControlRequired, +} from './custom'; + +export interface WizardContractAPI { + /** + * Returns a string representation of a contract generated using the provided options. If opts is not provided, uses `defaults`. + */ + print: (opts?: Options) => string; + + /** + * The default options that are used for `print`. + */ + defaults: Required; +} + +export interface AccessControlAPI { + /** + * Whether any of the provided options require access control to be enabled. If this returns `true`, then calling `print` with the + * same options would cause the `access` option to default to `'ownable'` if it was `undefined` or `false`. + */ + isAccessControlRequired: (opts: Partial) => boolean; +} + +export type ERC20 = WizardContractAPI & AccessControlAPI; +export type ERC721 = WizardContractAPI & AccessControlAPI; +export type ERC1155 = WizardContractAPI & AccessControlAPI; +export type Stablecoin = WizardContractAPI & AccessControlAPI; +export type RealWorldAsset = WizardContractAPI & AccessControlAPI; +export type Account = WizardContractAPI; +export type Governor = WizardContractAPI & AccessControlAPI; +export type Custom = WizardContractAPI & AccessControlAPI; + +export const erc20: ERC20 = { + print: printERC20, + defaults: erc20defaults, + isAccessControlRequired: erc20IsAccessControlRequired, +}; +export const erc721: ERC721 = { + print: printERC721, + defaults: erc721defaults, + isAccessControlRequired: erc721IsAccessControlRequired, +}; +export const erc1155: ERC1155 = { + print: printERC1155, + defaults: erc1155defaults, + isAccessControlRequired: erc1155IsAccessControlRequired, +}; +export const stablecoin: Stablecoin = { + print: printStablecoin, + defaults: stablecoinDefaults, + isAccessControlRequired: stablecoinIsAccessControlRequired, +}; +export const account: Account = { + print: printAccount, + defaults: accountDefaults, +}; +export const realWorldAsset: RealWorldAsset = { + print: printStablecoin, + defaults: stablecoinDefaults, + isAccessControlRequired: stablecoinIsAccessControlRequired, +}; +export const governor: Governor = { + print: printGovernor, + defaults: governorDefaults, + isAccessControlRequired: governorIsAccessControlRequired, +}; +export const custom: Custom = { + print: printCustom, + defaults: customDefaults, + isAccessControlRequired: customIsAccessControlRequired, +}; diff --git a/packages/core/confidential/src/build-generic.ts b/packages/core/confidential/src/build-generic.ts new file mode 100644 index 000000000..5a6ca4057 --- /dev/null +++ b/packages/core/confidential/src/build-generic.ts @@ -0,0 +1,61 @@ +import type { CustomOptions } from './custom'; +import { buildCustom } from './custom'; +import type { ERC20Options } from './erc20'; +import { buildERC20 } from './erc20'; +import type { ERC721Options } from './erc721'; +import { buildERC721 } from './erc721'; +import type { ERC1155Options } from './erc1155'; +import { buildERC1155 } from './erc1155'; +import type { StablecoinOptions } from './stablecoin'; +import { buildStablecoin } from './stablecoin'; +import type { GovernorOptions } from './governor'; +import { buildGovernor } from './governor'; +import type { Contract } from './contract'; +import { buildAccount } from './account'; +import type { AccountOptions } from './account'; + +export interface KindedOptions { + ERC20: { kind: 'ERC20' } & ERC20Options; + ERC721: { kind: 'ERC721' } & ERC721Options; + ERC1155: { kind: 'ERC1155' } & ERC1155Options; + Stablecoin: { kind: 'Stablecoin' } & StablecoinOptions; + RealWorldAsset: { kind: 'RealWorldAsset' } & StablecoinOptions; + Account: { kind: 'Account' } & AccountOptions; + Governor: { kind: 'Governor' } & GovernorOptions; + Custom: { kind: 'Custom' } & CustomOptions; +} + +export type GenericOptions = KindedOptions[keyof KindedOptions]; + +export function buildGeneric(opts: GenericOptions): Contract { + switch (opts.kind) { + case 'ERC20': + return buildERC20(opts); + + case 'ERC721': + return buildERC721(opts); + + case 'ERC1155': + return buildERC1155(opts); + + case 'Stablecoin': + return buildStablecoin(opts); + + case 'RealWorldAsset': + return buildStablecoin(opts); + + case 'Account': + return buildAccount(opts); + + case 'Governor': + return buildGovernor(opts); + + case 'Custom': + return buildCustom(opts); + + default: { + const _: never = opts; + throw new Error('Unknown ERC'); + } + } +} diff --git a/packages/core/confidential/src/common-functions.ts b/packages/core/confidential/src/common-functions.ts new file mode 100644 index 000000000..cf311c898 --- /dev/null +++ b/packages/core/confidential/src/common-functions.ts @@ -0,0 +1,9 @@ +import type { BaseFunction } from './contract'; + +export const supportsInterface: BaseFunction = { + name: 'supportsInterface', + kind: 'public', + args: [{ name: 'interfaceId', type: 'bytes4' }], + returns: ['bool'], + mutability: 'view', +}; diff --git a/packages/core/confidential/src/common-options.ts b/packages/core/confidential/src/common-options.ts new file mode 100644 index 000000000..b001ae5f6 --- /dev/null +++ b/packages/core/confidential/src/common-options.ts @@ -0,0 +1,24 @@ +import type { Access } from './set-access-control'; +import type { Info } from './set-info'; +import { defaults as infoDefaults } from './set-info'; +import type { Upgradeable } from './set-upgradeable'; + +export const defaults: Required = { + access: false, + upgradeable: false, + info: infoDefaults, +} as const; + +export interface CommonOptions { + access?: Access; + upgradeable?: Upgradeable; + info?: Info; +} + +export function withCommonDefaults(opts: CommonOptions): Required { + return { + access: opts.access ?? false, + upgradeable: opts.upgradeable ?? false, + info: opts.info ?? {}, + }; +} diff --git a/packages/core/confidential/src/contract.test.ts b/packages/core/confidential/src/contract.test.ts new file mode 100644 index 000000000..9e81545bb --- /dev/null +++ b/packages/core/confidential/src/contract.test.ts @@ -0,0 +1,174 @@ +import test from 'ava'; + +import { ContractBuilder } from './contract'; +import { printContract } from './print'; +import { TAG_SECURITY_CONTACT } from './set-info'; + +const toContractReference = (name: string) => { + return { + name: name, + }; +}; + +const toParentContract = (name: string, path: string) => { + return { + name: name, + path: path, + }; +}; + +test('contract basics', t => { + const Foo = new ContractBuilder('Foo'); + t.snapshot(printContract(Foo)); +}); + +test('contract name is unicodeSafe', t => { + const Foo = new ContractBuilder('Footeć'); + t.snapshot(printContract(Foo)); +}); + +test('contract with a parent', t => { + const Foo = new ContractBuilder('Foo'); + const Bar = toParentContract('Bar', './Bar.sol'); + Foo.addParent(Bar); + t.snapshot(printContract(Foo)); +}); + +test('contract with two parents', t => { + const Foo = new ContractBuilder('Foo'); + const Bar = toParentContract('Bar', './Bar.sol'); + const Quux = toParentContract('Quux', './Quux.sol'); + Foo.addParent(Bar); + Foo.addParent(Quux); + t.snapshot(printContract(Foo)); +}); + +test('contract with a parent with parameters', t => { + const Foo = new ContractBuilder('Foo'); + const Bar = toParentContract('Bar', './Bar.sol'); + Foo.addParent(Bar, ['param1', 'param2']); + t.snapshot(printContract(Foo)); +}); + +test('contract with two parents only one with parameters', t => { + const Foo = new ContractBuilder('Foo'); + const Bar = toParentContract('Bar', './Bar.sol'); + const Quux = toParentContract('Quux', './Quux.sol'); + Foo.addParent(Bar, ['param1', 'param2']); + Foo.addParent(Quux); + t.snapshot(printContract(Foo)); +}); + +test('contract with one override', t => { + const Foo = new ContractBuilder('Foo'); + const _beforeTokenTransfer = { + name: '_beforeTokenTransfer', + kind: 'internal' as const, + args: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'amount', type: 'uint256' }, + ], + }; + Foo.addOverride(toContractReference('ERC20'), _beforeTokenTransfer); + t.snapshot(printContract(Foo)); +}); + +test('contract with two overrides', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addOverride(toContractReference('ERC20'), _beforeTokenTransfer); + Foo.addOverride(toContractReference('ERC20Snapshot'), _beforeTokenTransfer); + t.snapshot(printContract(Foo)); +}); + +test('contract with two different overrides', t => { + const Foo = new ContractBuilder('Foo'); + + Foo.addOverride(toContractReference('ERC20'), _beforeTokenTransfer); + Foo.addOverride(toContractReference('OtherParent'), _beforeTokenTransfer); + Foo.addOverride(toContractReference('ERC20'), _otherFunction); + Foo.addOverride(toContractReference('OtherParent'), _otherFunction); + t.snapshot(printContract(Foo)); +}); + +test('contract with a modifier', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addModifier('whenNotPaused', _otherFunction); + t.snapshot(printContract(Foo)); +}); + +test('contract with a modifier and override', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addModifier('whenNotPaused', _otherFunction); + + Foo.addOverride(toContractReference('ERC20'), _otherFunction); + Foo.addOverride(toContractReference('OtherParent'), _otherFunction); + t.snapshot(printContract(Foo)); +}); + +test('contract with constructor code', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addConstructorCode('_mint(msg.sender, 10 ether);'); + t.snapshot(printContract(Foo)); +}); + +test('contract with constructor code and a parent', t => { + const Foo = new ContractBuilder('Foo'); + const Bar = toParentContract('Bar', './Bar.sol'); + Foo.addParent(Bar, ['param1', 'param2']); + Foo.addConstructorCode('_mint(msg.sender, 10 ether);'); + t.snapshot(printContract(Foo)); +}); + +test('contract with function code', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addFunctionCode('_mint(msg.sender, 10 ether);', _otherFunction); + t.snapshot(printContract(Foo)); +}); + +test('contract with overridden function with code', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addOverride(toContractReference('Bar'), _otherFunction); + Foo.addFunctionCode('_mint(msg.sender, 10 ether);', _otherFunction); + t.snapshot(printContract(Foo)); +}); + +test('contract with one variable', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addVariable('uint value = 42;'); + t.snapshot(printContract(Foo)); +}); + +test('contract with two variables', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addVariable('uint value = 42;'); + Foo.addVariable('string name = "john";'); + t.snapshot(printContract(Foo)); +}); + +test('name with special characters', t => { + const Foo = new ContractBuilder('foo bar baz'); + t.snapshot(printContract(Foo)); +}); + +test('contract with info', t => { + const Foo = new ContractBuilder('Foo'); + Foo.addNatspecTag(TAG_SECURITY_CONTACT, 'security@example.com'); + t.snapshot(printContract(Foo)); +}); + +const _beforeTokenTransfer = { + name: '_beforeTokenTransfer', + kind: 'internal' as const, + args: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'amount', type: 'uint256' }, + ], +}; + +const _otherFunction = { + name: '_otherFunction', + kind: 'internal' as const, + args: [], +}; diff --git a/packages/core/confidential/src/contract.test.ts.md b/packages/core/confidential/src/contract.test.ts.md new file mode 100644 index 000000000..f0f01afb2 --- /dev/null +++ b/packages/core/confidential/src/contract.test.ts.md @@ -0,0 +1,288 @@ +# Snapshot report for `src/contract.test.ts` + +The actual snapshot is saved in `contract.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## contract basics + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + }␊ + ` + +## contract name is unicodeSafe + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Footec {␊ + }␊ + ` + +## contract with a parent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Bar} from "./Bar.sol";␊ + ␊ + contract Foo is Bar {␊ + }␊ + ` + +## contract with two parents + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Bar} from "./Bar.sol";␊ + import {Quux} from "./Quux.sol";␊ + ␊ + contract Foo is Bar, Quux {␊ + }␊ + ` + +## contract with a parent with parameters + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Bar} from "./Bar.sol";␊ + ␊ + contract Foo is Bar {␊ + constructor() Bar("param1", "param2") {}␊ + }␊ + ` + +## contract with two parents only one with parameters + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Bar} from "./Bar.sol";␊ + import {Quux} from "./Quux.sol";␊ + ␊ + contract Foo is Bar, Quux {␊ + constructor() Bar("param1", "param2") {}␊ + }␊ + ` + +## contract with one override + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + }␊ + ` + +## contract with two overrides + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _beforeTokenTransfer(address from, address to, uint256 amount)␊ + internal␊ + override(ERC20, ERC20Snapshot)␊ + {␊ + super._beforeTokenTransfer(from, to, amount);␊ + }␊ + }␊ + ` + +## contract with two different overrides + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _beforeTokenTransfer(address from, address to, uint256 amount)␊ + internal␊ + override(ERC20, OtherParent)␊ + {␊ + super._beforeTokenTransfer(from, to, amount);␊ + }␊ + ␊ + function _otherFunction() internal override(ERC20, OtherParent) {␊ + super._otherFunction();␊ + }␊ + }␊ + ` + +## contract with a modifier + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + function _otherFunction() internal whenNotPaused {}␊ + }␊ + ` + +## contract with a modifier and override + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + function _otherFunction() internal override(ERC20, OtherParent) whenNotPaused {␊ + super._otherFunction();␊ + }␊ + }␊ + ` + +## contract with constructor code + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + constructor() {␊ + _mint(msg.sender, 10 ether);␊ + }␊ + }␊ + ` + +## contract with constructor code and a parent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Bar} from "./Bar.sol";␊ + ␊ + contract Foo is Bar {␊ + constructor() Bar("param1", "param2") {␊ + _mint(msg.sender, 10 ether);␊ + }␊ + }␊ + ` + +## contract with function code + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + function _otherFunction() internal {␊ + _mint(msg.sender, 10 ether);␊ + }␊ + }␊ + ` + +## contract with overridden function with code + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + function _otherFunction() internal override {␊ + _mint(msg.sender, 10 ether);␊ + super._otherFunction();␊ + }␊ + }␊ + ` + +## contract with one variable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + uint value = 42;␊ + }␊ + ` + +## contract with two variables + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Foo {␊ + uint value = 42;␊ + string name = "john";␊ + }␊ + ` + +## name with special characters + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract FooBarBaz {␊ + }␊ + ` + +## contract with info + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + /// @custom:security-contact security@example.com␊ + contract Foo {␊ + }␊ + ` diff --git a/packages/core/confidential/src/contract.test.ts.snap b/packages/core/confidential/src/contract.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..f14822349451cbe78deed32ceabf528d107894a1 GIT binary patch literal 1009 zcmV=)~qR8b3TXQ>d`jg+5+nv8{ z+b}(K`ts0O>L8OiH0dH!)T1a)z`4npf^EY%4??17%|}?Esty-IWLGc@(WeZ?lldfE z9koWR;X)|LTtGl_pSn~n!PQ~wxK%keRwy)~O>hp&g_S~rd2yiG!$^QYB}9xm+{J0) zVVc21gTb91F;M8Vl9+Gy#WN5HiO@Jw=wG*@-|`~2iSTI?#qK z?4|u?u${hxYn;*U34gezQIuAP`2Z%t&j*3 zphA%$%@;$OPkkg!hXeosIGjl(B1dsi8r0WI#hBxfVi{I{Rf>bKywW02rDI%xGk*y< z!{3TEo8NAz^}UbO`nw=)P}F^2#xMFW49`%et_@8^3*LHlLf zFjGhHxbO1?%I3g}n4>6X5{OtcLW01X5f$h{Z3(86p{+tZM&l8xnNU_C=&6$_$Kt12!+0=lrb|5!<2u;I)-5^1*0296`;As?rxJQY82>MI5{lP(ofTUN55zq&6d9sJ zi4RVl=#evz{*MgC_j<*+N<@|1YCV?;(>TgJo<{%PK>unp(c88Sr<_PC9-NTqM1rcN fA&pr>Zd^EpizEnrv>YC!PoTd5=1kbuD-{3$zh&v2 literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/contract.ts b/packages/core/confidential/src/contract.ts new file mode 100644 index 000000000..6ed276124 --- /dev/null +++ b/packages/core/confidential/src/contract.ts @@ -0,0 +1,222 @@ +import { toIdentifier } from './utils/to-identifier'; + +export interface Contract { + name: string; + license: string; + parents: Parent[]; + natspecTags: NatspecTag[]; + imports: ImportContract[]; + functions: ContractFunction[]; + constructorCode: string[]; + constructorArgs: FunctionArgument[]; + variables: string[]; + upgradeable: boolean; +} + +export type Value = string | number | { lit: string } | { note: string; value: Value }; + +export interface Parent { + contract: ImportContract; + params: Value[]; + importOnly?: boolean; +} + +export interface ImportContract extends ReferencedContract { + path: string; +} + +export interface ReferencedContract { + name: string; + transpiled?: boolean; +} + +export interface Using { + library: ImportContract; + usingFor: string; +} + +export interface BaseFunction { + name: string; + args: FunctionArgument[]; + returns?: string[]; + kind: FunctionKind; + mutability?: FunctionMutability; +} + +export interface ContractFunction extends BaseFunction { + override: Set; + modifiers: string[]; + code: string[]; + mutability: FunctionMutability; + final: boolean; + comments: string[]; +} + +export type FunctionKind = 'internal' | 'public'; +export type FunctionMutability = (typeof mutabilityRank)[number]; + +// Order is important +const mutabilityRank = ['pure', 'view', 'nonpayable', 'payable'] as const; + +function maxMutability(a: FunctionMutability, b: FunctionMutability): FunctionMutability { + return mutabilityRank[Math.max(mutabilityRank.indexOf(a), mutabilityRank.indexOf(b))]!; +} + +export interface FunctionArgument { + type: string | ReferencedContract; + name: string; +} + +export interface NatspecTag { + key: string; + value: string; +} + +export class ContractBuilder implements Contract { + readonly name: string; + license: string = 'MIT'; + upgradeable = false; + + readonly using: Using[] = []; + readonly natspecTags: NatspecTag[] = []; + + readonly constructorArgs: FunctionArgument[] = []; + readonly constructorCode: string[] = []; + readonly variableSet: Set = new Set(); + + private parentMap: Map = new Map(); + private functionMap: Map = new Map(); + + constructor(name: string) { + this.name = toIdentifier(name, true); + } + + get parents(): Parent[] { + return [...this.parentMap.values()] + .filter(p => !p.importOnly) + .sort((a, b) => { + if (a.contract.name === 'Initializable') { + return -1; + } else if (b.contract.name === 'Initializable') { + return 1; + } else { + return 0; + } + }); + } + + get imports(): ImportContract[] { + return [...[...this.parentMap.values()].map(p => p.contract), ...this.using.map(u => u.library)]; + } + + get functions(): ContractFunction[] { + return [...this.functionMap.values()]; + } + + get variables(): string[] { + return [...this.variableSet]; + } + + addParent(contract: ImportContract, params: Value[] = []): boolean { + const present = this.parentMap.has(contract.name); + this.parentMap.set(contract.name, { contract, params }); + return !present; + } + + addImportOnly(contract: ImportContract): boolean { + const present = this.parentMap.has(contract.name); + this.parentMap.set(contract.name, { + contract, + params: [], + importOnly: true, + }); + return !present; + } + + addOverride(parent: ReferencedContract, baseFn: BaseFunction, mutability?: FunctionMutability) { + const fn = this.addFunction(baseFn); + fn.override.add(parent); + if (mutability) { + fn.mutability = maxMutability(fn.mutability, mutability); + } + } + + addModifier(modifier: string, baseFn: BaseFunction) { + const fn = this.addFunction(baseFn); + fn.modifiers.push(modifier); + } + + addNatspecTag(key: string, value: string) { + // eslint-disable-next-line no-useless-escape + if (!/^(@custom:)?[a-z][a-z\-]*$/.exec(key)) throw new Error(`Invalid natspec key: ${key}`); + this.natspecTags.push({ key, value }); + } + + private addFunction(baseFn: BaseFunction): ContractFunction { + const signature = [baseFn.name, '(', ...baseFn.args.map(a => a.name), ')'].join(''); + const got = this.functionMap.get(signature); + if (got !== undefined) { + return got; + } else { + const fn: ContractFunction = { + override: new Set(), + modifiers: [], + code: [], + mutability: 'nonpayable', + final: false, + comments: [], + ...baseFn, + }; + this.functionMap.set(signature, fn); + return fn; + } + } + + addConstructorArgument(arg: FunctionArgument) { + this.constructorArgs.push(arg); + } + + addConstructorCode(code: string) { + this.constructorCode.push(code); + } + + addFunctionCode(code: string, baseFn: BaseFunction, mutability?: FunctionMutability) { + const fn = this.addFunction(baseFn); + if (fn.final) { + throw new Error(`Function ${baseFn.name} is already finalized`); + } + fn.code.push(code); + if (mutability) { + fn.mutability = maxMutability(fn.mutability, mutability); + } + } + + setFunctionBody(code: string[], baseFn: BaseFunction, mutability?: FunctionMutability) { + const fn = this.addFunction(baseFn); + if (fn.code.length > 0) { + throw new Error(`Function ${baseFn.name} has additional code`); + } + fn.code.push(...code); + fn.final = true; + if (mutability) { + fn.mutability = mutability; + } + } + + setFunctionComments(comments: string[], baseFn: BaseFunction) { + const fn = this.addFunction(baseFn); + if (fn.comments.length > 0) { + throw new Error(`Function ${baseFn.name} already has comments`); + } + fn.comments = comments; + } + + /** + * Note: The type in the variable is not currently transpiled, even if it refers to a contract + */ + addVariable(code: string): boolean { + const present = this.variableSet.has(code); + this.variableSet.add(code); + return !present; + } +} diff --git a/packages/core/confidential/src/custom.test.ts b/packages/core/confidential/src/custom.test.ts new file mode 100644 index 000000000..6262bf26a --- /dev/null +++ b/packages/core/confidential/src/custom.test.ts @@ -0,0 +1,101 @@ +import test from 'ava'; +import { custom } from '.'; + +import type { CustomOptions } from './custom'; +import { buildCustom } from './custom'; +import { printContract } from './print'; + +function testCustom(title: string, opts: Partial) { + test(title, t => { + const c = buildCustom({ + name: 'MyContract', + ...opts, + }); + t.snapshot(printContract(c)); + }); +} + +/** + * Tests external API for equivalence with internal API + */ +function testAPIEquivalence(title: string, opts?: CustomOptions) { + test(title, t => { + t.is( + custom.print(opts), + printContract( + buildCustom({ + name: 'MyContract', + ...opts, + }), + ), + ); + }); +} + +testCustom('custom', {}); + +testCustom('custom name is unicode safe', { + name: 'ćontract', +}); + +testCustom('pausable', { + pausable: true, +}); + +testCustom('upgradeable transparent', { + upgradeable: 'transparent', +}); + +testCustom('upgradeable uups', { + upgradeable: 'uups', +}); + +testCustom('access control disabled', { + access: false, +}); + +testCustom('access control ownable', { + access: 'ownable', +}); + +testCustom('access control roles', { + access: 'roles', +}); + +testCustom('access control managed', { + access: 'managed', +}); + +testCustom('upgradeable uups with access control disabled', { + // API should override access to true since it is required for UUPS + access: false, + upgradeable: 'uups', +}); + +testAPIEquivalence('custom API default'); + +testAPIEquivalence('custom API basic', { name: 'CustomContract' }); + +testAPIEquivalence('custom API full upgradeable', { + name: 'CustomContract', + access: 'roles', + pausable: true, + upgradeable: 'uups', +}); + +testAPIEquivalence('custom API full upgradeable with managed', { + name: 'CustomContract', + access: 'managed', + pausable: true, + upgradeable: 'uups', +}); + +test('custom API assert defaults', async t => { + t.is(custom.print(custom.defaults), custom.print()); +}); + +test('API isAccessControlRequired', async t => { + t.is(custom.isAccessControlRequired({ pausable: true }), true); + t.is(custom.isAccessControlRequired({ upgradeable: 'uups' }), true); + t.is(custom.isAccessControlRequired({ upgradeable: 'transparent' }), false); +}); diff --git a/packages/core/confidential/src/custom.test.ts.md b/packages/core/confidential/src/custom.test.ts.md new file mode 100644 index 000000000..7906d5648 --- /dev/null +++ b/packages/core/confidential/src/custom.test.ts.md @@ -0,0 +1,192 @@ +# Snapshot report for `src/custom.test.ts` + +The actual snapshot is saved in `custom.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## custom + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract MyContract {␊ + }␊ + ` + +## custom name is unicode safe + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract Contract {␊ + }␊ + ` + +## pausable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";␊ + ␊ + contract MyContract is Pausable, Ownable {␊ + constructor(address initialOwner) Ownable(initialOwner) {}␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + }␊ + ` + +## upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyContract is Initializable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + }␊ + ` + +## upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyContract is Initializable, OwnableUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialOwner) public initializer {␊ + __Ownable_init(initialOwner);␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + }␊ + ` + +## access control disabled + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract MyContract {␊ + }␊ + ` + +## access control ownable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyContract is Ownable {␊ + constructor(address initialOwner) Ownable(initialOwner) {}␊ + }␊ + ` + +## access control roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + ␊ + contract MyContract is AccessControl {␊ + constructor(address defaultAdmin) {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + }␊ + }␊ + ` + +## access control managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + ␊ + contract MyContract is AccessManaged {␊ + constructor(address initialAuthority) AccessManaged(initialAuthority) {}␊ + }␊ + ` + +## upgradeable uups with access control disabled + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyContract is Initializable, OwnableUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialOwner) public initializer {␊ + __Ownable_init(initialOwner);␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + }␊ + ` diff --git a/packages/core/confidential/src/custom.test.ts.snap b/packages/core/confidential/src/custom.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..6e45868ebc43a0d3944a8fac1f9c3678ce4cad85 GIT binary patch literal 859 zcmV-h1El;xRzVt)_9EGnT+ zo|40k*B^@r00000000B+R!wUYK^RUfBJ54CUS4}jpve|dl;&b+D+C%-+6G#|hRN7UPal0L*)|;R?;O|mh=ZBJwU&#SCIf=y z7PMPOmTki}_XN_UPce*%9zjQ7_7Mw#DPge9nU=`W3Qk|wU)47)A<@u7pg1Ki(Gxh` ztiP?leABQjCx$|Ml0?DGy0GGw&!0y<14AALqQGaw;VuS+2DnJ%n?dAqB}C@Y7zyMn z)ThOkPs+cHo`06_uxH{4E;Y zs^+u66l#c4KF)4PVPmRUXihkscjOC*=(HmjBzP9}Z>atZH#A5HHeDdq+fj4kOJXP8nirq~PKn?~8l zpmL-m^bH;LkgrEvl4&xxv@wRqEl*JFVWv@lt)?Xi(^xV@(*u5nr6exCK1e(@Jeg(f zGg>JKHRTlI>ACmmj&qjdz$01a`~hAV9G=~`tHMoR-aq@drz6$5kxEYS9Lp{r8v|{v zVxY~i)9t9yCC6&SEEukV{lkb|JU~9xP1hsLFr=YGOdoKHD?7XIo87&mUUR42`p`S* z?CoxtVTIpjeziTs&~VPzc~Wi}N^Gr8iFVZDl1fB`q;145rAUljy!6e;QuU;2MplaN lv!B3uEq`T+rnIbKKHO&>?lTYfnLE4B{09HG<+iL5002FQl(zr? literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/custom.ts b/packages/core/confidential/src/custom.ts new file mode 100644 index 000000000..5baaf31b5 --- /dev/null +++ b/packages/core/confidential/src/custom.ts @@ -0,0 +1,56 @@ +import type { Contract } from './contract'; +import { ContractBuilder } from './contract'; +import type { CommonOptions } from './common-options'; +import { withCommonDefaults, defaults as commonDefaults } from './common-options'; +import { setUpgradeable } from './set-upgradeable'; +import { setInfo } from './set-info'; +import { setAccessControl } from './set-access-control'; +import { addPausable } from './add-pausable'; +import { printContract } from './print'; + +export interface CustomOptions extends CommonOptions { + name: string; + pausable?: boolean; +} + +export const defaults: Required = { + name: 'MyContract', + pausable: false, + access: commonDefaults.access, + upgradeable: commonDefaults.upgradeable, + info: commonDefaults.info, +} as const; + +function withDefaults(opts: CustomOptions): Required { + return { + ...opts, + ...withCommonDefaults(opts), + pausable: opts.pausable ?? defaults.pausable, + }; +} + +export function printCustom(opts: CustomOptions = defaults): string { + return printContract(buildCustom(opts)); +} + +export function isAccessControlRequired(opts: Partial): boolean { + return opts.pausable || opts.upgradeable === 'uups'; +} + +export function buildCustom(opts: CustomOptions): Contract { + const allOpts = withDefaults(opts); + + const c = new ContractBuilder(allOpts.name); + + const { access, upgradeable, info } = allOpts; + + if (allOpts.pausable) { + addPausable(c, access, []); + } + + setAccessControl(c, access); + setUpgradeable(c, upgradeable, access); + setInfo(c, info); + + return c; +} diff --git a/packages/core/confidential/src/environments/hardhat/package-lock.json b/packages/core/confidential/src/environments/hardhat/package-lock.json new file mode 100644 index 000000000..8fea47d86 --- /dev/null +++ b/packages/core/confidential/src/environments/hardhat/package-lock.json @@ -0,0 +1,7870 @@ +{ + "name": "hardhat-sample", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "hardhat-sample", + "version": "0.0.1", + "license": "ISC", + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^6.1.0", + "@openzeppelin/contracts": "^5.4.0", + "hardhat": "^2.16.1" + } + }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", + "dev": true, + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/util": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-9.1.0.tgz", + "integrity": "sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz", + "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz", + "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz", + "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz", + "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/rlp": "^5.8.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz", + "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", + "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", + "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz", + "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz", + "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", + "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", + "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT" + }, + "node_modules/@ethersproject/networks": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz", + "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", + "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz", + "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz", + "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", + "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz", + "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz", + "integrity": "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", + "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@noble/ciphers": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", + "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nomicfoundation/edr": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.11.3.tgz", + "integrity": "sha512-kqILRkAd455Sd6v8mfP3C1/0tCOynJWY+Ir+k/9Boocu2kObCrsFgG+ZWB7fSBVdd9cPVSNrnhWS+V+PEo637g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nomicfoundation/edr-darwin-arm64": "0.11.3", + "@nomicfoundation/edr-darwin-x64": "0.11.3", + "@nomicfoundation/edr-linux-arm64-gnu": "0.11.3", + "@nomicfoundation/edr-linux-arm64-musl": "0.11.3", + "@nomicfoundation/edr-linux-x64-gnu": "0.11.3", + "@nomicfoundation/edr-linux-x64-musl": "0.11.3", + "@nomicfoundation/edr-win32-x64-msvc": "0.11.3" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-darwin-arm64": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.11.3.tgz", + "integrity": "sha512-w0tksbdtSxz9nuzHKsfx4c2mwaD0+l5qKL2R290QdnN9gi9AV62p9DHkOgfBdyg6/a6ZlnQqnISi7C9avk/6VA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-darwin-x64": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.11.3.tgz", + "integrity": "sha512-QR4jAFrPbOcrO7O2z2ESg+eUeIZPe2bPIlQYgiJ04ltbSGW27FblOzdd5+S3RoOD/dsZGKAvvy6dadBEl0NgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.11.3.tgz", + "integrity": "sha512-Ktjv89RZZiUmOFPspuSBVJ61mBZQ2+HuLmV67InNlh9TSUec/iDjGIwAn59dx0bF/LOSrM7qg5od3KKac4LJDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-arm64-musl": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.11.3.tgz", + "integrity": "sha512-B3sLJx1rL2E9pfdD4mApiwOZSrX0a/KQSBWdlq1uAhFKqkl00yZaY4LejgZndsJAa4iKGQJlGnw4HCGeVt0+jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-x64-gnu": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.11.3.tgz", + "integrity": "sha512-D/4cFKDXH6UYyKPu6J3Y8TzW11UzeQI0+wS9QcJzjlrrfKj0ENW7g9VihD1O2FvXkdkTjcCZYb6ai8MMTCsaVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-x64-musl": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.11.3.tgz", + "integrity": "sha512-ergXuIb4nIvmf+TqyiDX5tsE49311DrBky6+jNLgsGDTBaN1GS3OFwFS8I6Ri/GGn6xOaT8sKu3q7/m+WdlFzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-win32-x64-msvc": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.11.3.tgz", + "integrity": "sha512-snvEf+WB3OV0wj2A7kQ+ZQqBquMcrozSLXcdnMdEl7Tmn+KDCbmFKBt3Tk0X3qOU4RKQpLPnTxdM07TJNVtung==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/hardhat-chai-matchers": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.1.0.tgz", + "integrity": "sha512-GPhBNafh1fCnVD9Y7BYvoLnblnvfcq3j8YDbO1gGe/1nOFWzGmV7gFu5DkwFXF+IpYsS+t96o9qc/mPu3V3Vfw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/chai-as-promised": "^7.1.3", + "chai-as-promised": "^7.1.1", + "deep-eql": "^4.0.1", + "ordinal": "^1.0.3" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "chai": "^4.2.0", + "ethers": "^6.14.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-ethers": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.1.0.tgz", + "integrity": "sha512-jx6fw3Ms7QBwFGT2MU6ICG292z0P81u6g54JjSV105+FbTZOF4FJqPksLfDybxkkOeq28eDxbqq7vpxRYyIlxA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^4.1.1", + "lodash.isequal": "^4.5.0" + }, + "peerDependencies": { + "ethers": "^6.14.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-ignition": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.13.tgz", + "integrity": "sha512-G4XGPWvxs9DJhZ6PE1wdvKjHkjErWbsETf4c7YxO6GUz+MJGlw+PtgbnCwhL3tQzSq3oD4MB0LGi+sK0polpUA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nomicfoundation/ignition-core": "^0.15.13", + "@nomicfoundation/ignition-ui": "^0.15.12", + "chalk": "^4.0.0", + "debug": "^4.3.2", + "fs-extra": "^10.0.0", + "json5": "^2.2.3", + "prompts": "^2.4.2" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-verify": "^2.1.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-ignition-ethers": { + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.14.tgz", + "integrity": "sha512-eq+5n+c1DW18/Xp8/QrHBBvG5QaKUxYF/byol4f1jrnZ1zAy0OrqEa/oaNFWchhpLalX7d7suk/2EL0PbT0CDQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition": "^0.15.13", + "@nomicfoundation/ignition-core": "^0.15.13", + "ethers": "^6.14.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-network-helpers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.1.0.tgz", + "integrity": "sha512-ZS+NulZuR99NUHt2VwcgZvgeD6Y63qrbORNRuKO+lTowJxNVsrJ0zbRx1j5De6G3dOno5pVGvuYSq2QVG0qCYg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ethereumjs-util": "^7.1.4" + }, + "peerDependencies": { + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-toolbox": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.1.0.tgz", + "integrity": "sha512-iAIl6pIK3F4R3JXeq+b6tiShXUrp1sQRiPfqoCMUE7QLUzoFifzGV97IDRL6e73pWsMKpUQBsHBvTCsqn+ZdpA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@nomicfoundation/hardhat-chai-matchers": "^2.1.0", + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.14", + "@nomicfoundation/hardhat-network-helpers": "^1.1.0", + "@nomicfoundation/hardhat-verify": "^2.1.0", + "@typechain/ethers-v6": "^0.5.0", + "@typechain/hardhat": "^9.0.0", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", + "@types/node": ">=20.0.0", + "chai": "^4.2.0", + "ethers": "^6.14.0", + "hardhat": "^2.26.0", + "hardhat-gas-reporter": "^2.3.0", + "solidity-coverage": "^0.8.1", + "ts-node": ">=8.0.0", + "typechain": "^8.3.0", + "typescript": ">=4.5.0" + } + }, + "node_modules/@nomicfoundation/hardhat-verify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.1.1.tgz", + "integrity": "sha512-K1plXIS42xSHDJZRkrE2TZikqxp9T4y6jUMUNI/imLgN5uCcEQokmfU0DlyP9zzHncYK92HlT5IWP35UVCLrPw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@ethersproject/address": "^5.0.2", + "cbor": "^8.1.0", + "debug": "^4.1.1", + "lodash.clonedeep": "^4.5.0", + "picocolors": "^1.1.0", + "semver": "^6.3.0", + "table": "^6.8.0", + "undici": "^5.14.0" + }, + "peerDependencies": { + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/ignition-core": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.13.tgz", + "integrity": "sha512-Z4T1WIbw0EqdsN9RxtnHeQXBi7P/piAmCu8bZmReIdDo/2h06qgKWxjDoNfc9VBFZJ0+Dx79tkgQR3ewxMDcpA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/address": "5.6.1", + "@nomicfoundation/solidity-analyzer": "^0.1.1", + "cbor": "^9.0.0", + "debug": "^4.3.2", + "ethers": "^6.14.0", + "fs-extra": "^10.0.0", + "immer": "10.0.2", + "lodash": "4.17.21", + "ndjson": "2.0.0" + } + }, + "node_modules/@nomicfoundation/ignition-core/node_modules/@ethersproject/address": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.1.tgz", + "integrity": "sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.6.2", + "@ethersproject/bytes": "^5.6.1", + "@ethersproject/keccak256": "^5.6.1", + "@ethersproject/logger": "^5.6.0", + "@ethersproject/rlp": "^5.6.1" + } + }, + "node_modules/@nomicfoundation/ignition-core/node_modules/cbor": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.2.tgz", + "integrity": "sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@nomicfoundation/ignition-ui": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-ui/-/ignition-ui-0.15.12.tgz", + "integrity": "sha512-nQl8tusvmt1ANoyIj5RQl9tVSEmG0FnNbtwnWbTim+F8JLm4YLHWS0yEgYUZC+BEO3oS0D8r6V8a02JGZJgqiQ==", + "dev": true, + "peer": true + }, + "node_modules/@nomicfoundation/solidity-analyzer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.2.tgz", + "integrity": "sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + }, + "optionalDependencies": { + "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.2", + "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.2", + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.2" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-arm64": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.2.tgz", + "integrity": "sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-x64": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.2.tgz", + "integrity": "sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.2.tgz", + "integrity": "sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-musl": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.2.tgz", + "integrity": "sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-gnu": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.2.tgz", + "integrity": "sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-musl": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.2.tgz", + "integrity": "sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-win32-x64-msvc": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.2.tgz", + "integrity": "sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@openzeppelin/contracts": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.6.tgz", + "integrity": "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sentry/core": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", + "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/core/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/hub": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", + "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/hub/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/minimal": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", + "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/minimal/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/node": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", + "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/core": "5.30.0", + "@sentry/hub": "5.30.0", + "@sentry/tracing": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/node/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/tracing": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", + "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/tracing/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@solidity-parser/parser": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.2.tgz", + "integrity": "sha512-rbu0bzwNvMcwAjH86hiEAcOeRI2EeK8zCkHDrFykh/Al8mvJeFmjy3UrE7GYQjNwOgbGUUtCn5/k8CB8zIu7QA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@typechain/ethers-v6": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz", + "integrity": "sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" + }, + "peerDependencies": { + "ethers": "6.x", + "typechain": "^8.3.2", + "typescript": ">=4.7.0" + } + }, + "node_modules/@typechain/hardhat": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-9.1.0.tgz", + "integrity": "sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fs-extra": "^9.1.0" + }, + "peerDependencies": { + "@typechain/ethers-v6": "^0.5.1", + "ethers": "^6.1.0", + "hardhat": "^2.9.9", + "typechain": "^8.3.2" + } + }, + "node_modules/@typechain/hardhat/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@types/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/secp256k1": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", + "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/abitype": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.8.tgz", + "integrity": "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.3.0" + } + }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "license": "BSD-3-Clause OR MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/brotli-wasm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brotli-wasm/-/brotli-wasm-2.0.1.tgz", + "integrity": "sha512-+3USgYsC7bzb5yU0/p2HnnynZl0ak0E6uoIm4UW4Aby/8s8HFCq6NCfrrf1E9c3O8OCSzq3oYO1tUVqIi61Nww==", + "dev": true, + "license": "Apache-2.0", + "peer": true + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=12.19" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", + "dev": true, + "license": "WTFPL", + "peer": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cipher-base": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true, + "license": "MIT" + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/command-line-usage/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/command-line-usage/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/command-line-usage/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", + "dev": true, + "peer": true + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/difflib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", + "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", + "dev": true, + "peer": true, + "dependencies": { + "heap": ">= 0.2.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" + } + }, + "node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethereum-bloom-filters": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.2.0.tgz", + "integrity": "sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "^1.4.0" + } + }, + "node_modules/ethereum-bloom-filters/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dev": true, + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ethers": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.15.0.tgz", + "integrity": "sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/ethers/node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "dev": true, + "license": "MIT" + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" + }, + "bin": { + "testrpc-sc": "index.js" + } + }, + "node_modules/ghost-testrpc/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/ghost-testrpc/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/ghost-testrpc/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/ghost-testrpc/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/globby/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/globby/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globby/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hardhat": { + "version": "2.26.3", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.26.3.tgz", + "integrity": "sha512-gBfjbxCCEaRgMCRgTpjo1CEoJwqNPhyGMMVHYZJxoQ3LLftp2erSVf8ZF6hTQC0r2wst4NcqNmLWqMnHg1quTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ethereumjs/util": "^9.1.0", + "@ethersproject/abi": "^5.1.2", + "@nomicfoundation/edr": "^0.11.3", + "@nomicfoundation/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "boxen": "^5.1.2", + "chokidar": "^4.0.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "find-up": "^5.0.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "json-stream-stringify": "^3.1.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "micro-eth-signer": "^0.14.0", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "picocolors": "^1.1.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.8.26", + "source-map-support": "^0.5.13", + "stacktrace-parser": "^0.1.10", + "tinyglobby": "^0.2.6", + "tsort": "0.0.1", + "undici": "^5.14.0", + "uuid": "^8.3.2", + "ws": "^7.4.6" + }, + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/hardhat-gas-reporter": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-2.3.0.tgz", + "integrity": "sha512-ySdA+044xMQv1BlJu5CYXToHzMexKFfIWxlQTBNNoerx1x96+d15IMdN01iQZ/TJ7NH2V5sU73bz77LoS/PEVw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/units": "^5.7.0", + "@solidity-parser/parser": "^0.20.1", + "axios": "^1.6.7", + "brotli-wasm": "^2.0.1", + "chalk": "4.1.2", + "cli-table3": "^0.6.3", + "ethereum-cryptography": "^2.1.3", + "glob": "^10.3.10", + "jsonschema": "^1.4.1", + "lodash": "^4.17.21", + "markdown-table": "2.0.0", + "sha1": "^1.1.1", + "viem": "^2.27.0" + }, + "peerDependencies": { + "hardhat": "^2.16.0" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/hardhat/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/hardhat/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/hardhat/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/hardhat/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/hardhat/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/immer": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.2.tgz", + "integrity": "sha512-Rx3CqeqQ19sxUtYV9CU911Vhy8/721wRFnJv3REVGWUmoAcIwzifTsdmJte/MV+0/XpM35LZdQMBGkRIoLPwQA==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fp-ts": "^1.0.0" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/isows": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.7.tgz", + "integrity": "sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stream-stringify": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz", + "integrity": "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=7.10.1" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonschema": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.5.0.tgz", + "integrity": "sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/keccak": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micro-eth-signer": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/micro-eth-signer/-/micro-eth-signer-0.14.0.tgz", + "integrity": "sha512-5PLLzHiVYPWClEvZIXXFu5yutzpadb73rnQCpUqIHu3No3coFuWQNfE5tkBQJ7djuLYl6aRLaS0MgWJYGoqiBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.8.1", + "@noble/hashes": "~1.7.1", + "micro-packed": "~0.7.2" + } + }, + "node_modules/micro-eth-signer/node_modules/@noble/curves": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.2.tgz", + "integrity": "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.7.2" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micro-eth-signer/node_modules/@noble/hashes": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.2.tgz", + "integrity": "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/micro-packed": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/micro-packed/-/micro-packed-0.7.3.tgz", + "integrity": "sha512-2Milxs+WNC00TRlem41oRswvw31146GiSaoCT7s3Xi2gMUglW5QBeqlQaZeHr5tJx9nm3i57LNXPqxOOaWtTYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "obliterator": "^2.0.0" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ndjson": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", + "integrity": "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.5", + "readable-stream": "^3.6.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "ndjson": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "dev": true, + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12.19" + } + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/obliterator": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.5.tgz", + "integrity": "sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==", + "dev": true, + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ox": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/ox/-/ox-0.8.6.tgz", + "integrity": "sha512-eiKcgiVVEGDtEpEdFi1EGoVVI48j6icXHce9nFwCNM7CKG3uoCXKdr4TPhS00Iy1TR2aWSF1ltPD0x/YgqIL9w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@adraffy/ens-normalize": "^1.11.0", + "@noble/ciphers": "^1.3.0", + "@noble/curves": "^1.9.1", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "abitype": "^1.0.8", + "eventemitter3": "5.0.1" + }, + "peerDependencies": { + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/ox/node_modules/@adraffy/ens-normalize": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz", + "integrity": "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/ox/node_modules/@noble/curves": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.6.tgz", + "integrity": "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ox/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0", + "peer": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", + "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "create-hash": "~1.1.3", + "create-hmac": "^1.1.7", + "ripemd160": "=2.0.1", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.11", + "to-buffer": "^1.2.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/pbkdf2/node_modules/create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" + } + }, + "node_modules/pbkdf2/node_modules/hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "inherits": "^2.0.1" + } + }, + "node_modules/pbkdf2/node_modules/ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "hash-base": "^2.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, + "peer": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/recursive-readdir/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/recursive-readdir/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dev": true, + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sc-istanbul": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", + "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" + } + }, + "node_modules/sc-istanbul/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/sc-istanbul/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/sc-istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sc-istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sc-istanbul/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/sc-istanbul/node_modules/js-yaml/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sc-istanbul/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sc-istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/sc-istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sc-istanbul/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/secp256k1/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "dev": true, + "license": "(MIT AND BSD-3-Clause)", + "peer": true, + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/shelljs/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/shelljs/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/shelljs/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/solc": { + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", + "integrity": "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/solidity-coverage": { + "version": "0.8.16", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.16.tgz", + "integrity": "sha512-qKqgm8TPpcnCK0HCDLJrjbOA2tQNEJY4dHX/LSSQ9iwYFS973MwjtgYn2Iv3vfCEQJTj5xtm4cuUMzlJsJSMbg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.20.1", + "chalk": "^2.4.2", + "death": "^1.1.0", + "difflib": "^0.2.4", + "fs-extra": "^8.1.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.21", + "mocha": "^10.2.0", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "semver": "^7.3.4", + "shelljs": "^0.8.3", + "web3-utils": "^1.3.6" + }, + "bin": { + "solidity-coverage": "plugins/bin.js" + }, + "peerDependencies": { + "hardhat": "^2.11.0" + } + }, + "node_modules/solidity-coverage/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/solidity-coverage/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/solidity-coverage/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/solidity-coverage/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/solidity-coverage/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/solidity-coverage/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/solidity-coverage/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/stacktrace-parser": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz", + "integrity": "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/stacktrace-parser/node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "license": "WTFPL OR MIT", + "peer": true + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", + "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-buffer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", + "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" + }, + "bin": { + "write-markdown": "dist/write-markdown.js" + } + }, + "node_modules/ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "typescript": ">=3.7.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true, + "license": "0BSD", + "peer": true + }, + "node_modules/tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", + "dev": true, + "license": "MIT" + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typechain": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", + "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" + } + }, + "node_modules/typechain/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/typechain/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typechain/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/typechain/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/typechain/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typechain/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undici": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/viem": { + "version": "2.33.3", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.33.3.tgz", + "integrity": "sha512-aWDr6i6r3OfNCs0h9IieHFhn7xQJJ8YsuA49+9T5JRyGGAkWhLgcbLq2YMecgwM7HdUZpx1vPugZjsShqNi7Gw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.9.2", + "@noble/hashes": "1.8.0", + "@scure/bip32": "1.7.0", + "@scure/bip39": "1.6.0", + "abitype": "1.0.8", + "isows": "1.0.7", + "ox": "0.8.6", + "ws": "8.18.2" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/@noble/curves": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.2.tgz", + "integrity": "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "license": "LGPL-3.0", + "peer": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-utils/node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "dev": true, + "license": "MPL-2.0", + "peer": true, + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/web3-utils/node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "dev": true, + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/web3-utils/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/packages/core/confidential/src/environments/hardhat/package.json b/packages/core/confidential/src/environments/hardhat/package.json new file mode 100644 index 000000000..625705c98 --- /dev/null +++ b/packages/core/confidential/src/environments/hardhat/package.json @@ -0,0 +1,16 @@ +{ + "name": "hardhat-sample", + "version": "0.0.1", + "description": "", + "main": "index.js", + "scripts": { + "test": "hardhat test" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@openzeppelin/contracts": "^5.4.0", + "@nomicfoundation/hardhat-toolbox": "^6.1.0", + "hardhat": "^2.16.1" + } +} diff --git a/packages/core/confidential/src/environments/hardhat/upgradeable/package-lock.json b/packages/core/confidential/src/environments/hardhat/upgradeable/package-lock.json new file mode 100644 index 000000000..aeeddb705 --- /dev/null +++ b/packages/core/confidential/src/environments/hardhat/upgradeable/package-lock.json @@ -0,0 +1,9653 @@ +{ + "name": "hardhat-sample", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "hardhat-sample", + "version": "0.0.1", + "license": "ISC", + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^6.1.0", + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0", + "@openzeppelin/hardhat-upgrades": "^3.0.0", + "hardhat": "^2.16.1" + } + }, + "node_modules/@adraffy/ens-normalize": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz", + "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@aws-crypto/crc32": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", + "integrity": "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-5.2.0.tgz", + "integrity": "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-js": "^5.2.0", + "@aws-crypto/supports-web-crypto": "^5.2.0", + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/sha256-js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^5.2.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-crypto/supports-web-crypto": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", + "integrity": "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.222.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-lambda": { + "version": "3.865.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-lambda/-/client-lambda-3.865.0.tgz", + "integrity": "sha512-ncCEW/kNRV8yJA/45z5HO6WEeihADzFY7RISfezDbvP3/X4dZb2gycRVPmJIE6CBqf01jwTkbG36qO+/iHIELg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.864.0", + "@aws-sdk/credential-provider-node": "3.864.0", + "@aws-sdk/middleware-host-header": "3.862.0", + "@aws-sdk/middleware-logger": "3.862.0", + "@aws-sdk/middleware-recursion-detection": "3.862.0", + "@aws-sdk/middleware-user-agent": "3.864.0", + "@aws-sdk/region-config-resolver": "3.862.0", + "@aws-sdk/types": "3.862.0", + "@aws-sdk/util-endpoints": "3.862.0", + "@aws-sdk/util-user-agent-browser": "3.862.0", + "@aws-sdk/util-user-agent-node": "3.864.0", + "@smithy/config-resolver": "^4.1.5", + "@smithy/core": "^3.8.0", + "@smithy/eventstream-serde-browser": "^4.0.5", + "@smithy/eventstream-serde-config-resolver": "^4.1.3", + "@smithy/eventstream-serde-node": "^4.0.5", + "@smithy/fetch-http-handler": "^5.1.1", + "@smithy/hash-node": "^4.0.5", + "@smithy/invalid-dependency": "^4.0.5", + "@smithy/middleware-content-length": "^4.0.5", + "@smithy/middleware-endpoint": "^4.1.18", + "@smithy/middleware-retry": "^4.1.19", + "@smithy/middleware-serde": "^4.0.9", + "@smithy/middleware-stack": "^4.0.5", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/node-http-handler": "^4.1.1", + "@smithy/protocol-http": "^5.1.3", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "@smithy/url-parser": "^4.0.5", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.26", + "@smithy/util-defaults-mode-node": "^4.0.26", + "@smithy/util-endpoints": "^3.0.7", + "@smithy/util-middleware": "^4.0.5", + "@smithy/util-retry": "^4.0.7", + "@smithy/util-stream": "^4.2.4", + "@smithy/util-utf8": "^4.0.0", + "@smithy/util-waiter": "^4.0.7", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-sso": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.864.0.tgz", + "integrity": "sha512-THiOp0OpQROEKZ6IdDCDNNh3qnNn/kFFaTSOiugDpgcE5QdsOxh1/RXq7LmHpTJum3cmnFf8jG59PHcz9Tjnlw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.864.0", + "@aws-sdk/middleware-host-header": "3.862.0", + "@aws-sdk/middleware-logger": "3.862.0", + "@aws-sdk/middleware-recursion-detection": "3.862.0", + "@aws-sdk/middleware-user-agent": "3.864.0", + "@aws-sdk/region-config-resolver": "3.862.0", + "@aws-sdk/types": "3.862.0", + "@aws-sdk/util-endpoints": "3.862.0", + "@aws-sdk/util-user-agent-browser": "3.862.0", + "@aws-sdk/util-user-agent-node": "3.864.0", + "@smithy/config-resolver": "^4.1.5", + "@smithy/core": "^3.8.0", + "@smithy/fetch-http-handler": "^5.1.1", + "@smithy/hash-node": "^4.0.5", + "@smithy/invalid-dependency": "^4.0.5", + "@smithy/middleware-content-length": "^4.0.5", + "@smithy/middleware-endpoint": "^4.1.18", + "@smithy/middleware-retry": "^4.1.19", + "@smithy/middleware-serde": "^4.0.9", + "@smithy/middleware-stack": "^4.0.5", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/node-http-handler": "^4.1.1", + "@smithy/protocol-http": "^5.1.3", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "@smithy/url-parser": "^4.0.5", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.26", + "@smithy/util-defaults-mode-node": "^4.0.26", + "@smithy/util-endpoints": "^3.0.7", + "@smithy/util-middleware": "^4.0.5", + "@smithy/util-retry": "^4.0.7", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/core": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.864.0.tgz", + "integrity": "sha512-LFUREbobleHEln+Zf7IG83lAZwvHZG0stI7UU0CtwyuhQy5Yx0rKksHNOCmlM7MpTEbSCfntEhYi3jUaY5e5lg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.862.0", + "@aws-sdk/xml-builder": "3.862.0", + "@smithy/core": "^3.8.0", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/property-provider": "^4.0.5", + "@smithy/protocol-http": "^5.1.3", + "@smithy/signature-v4": "^5.1.3", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.5", + "@smithy/util-utf8": "^4.0.0", + "fast-xml-parser": "5.2.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.864.0.tgz", + "integrity": "sha512-StJPOI2Rt8UE6lYjXUpg6tqSZaM72xg46ljPg8kIevtBAAfdtq9K20qT/kSliWGIBocMFAv0g2mC0hAa+ECyvg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/property-provider": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.864.0.tgz", + "integrity": "sha512-E/RFVxGTuGnuD+9pFPH2j4l6HvrXzPhmpL8H8nOoJUosjx7d4v93GJMbbl1v/fkDLqW9qN4Jx2cI6PAjohA6OA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/fetch-http-handler": "^5.1.1", + "@smithy/node-http-handler": "^4.1.1", + "@smithy/property-provider": "^4.0.5", + "@smithy/protocol-http": "^5.1.3", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "@smithy/util-stream": "^4.2.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.864.0.tgz", + "integrity": "sha512-PlxrijguR1gxyPd5EYam6OfWLarj2MJGf07DvCx9MAuQkw77HBnsu6+XbV8fQriFuoJVTBLn9ROhMr/ROAYfUg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.864.0", + "@aws-sdk/credential-provider-env": "3.864.0", + "@aws-sdk/credential-provider-http": "3.864.0", + "@aws-sdk/credential-provider-process": "3.864.0", + "@aws-sdk/credential-provider-sso": "3.864.0", + "@aws-sdk/credential-provider-web-identity": "3.864.0", + "@aws-sdk/nested-clients": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/credential-provider-imds": "^4.0.7", + "@smithy/property-provider": "^4.0.5", + "@smithy/shared-ini-file-loader": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-node": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.864.0.tgz", + "integrity": "sha512-2BEymFeXURS+4jE9tP3vahPwbYRl0/1MVaFZcijj6pq+nf5EPGvkFillbdBRdc98ZI2NedZgSKu3gfZXgYdUhQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.864.0", + "@aws-sdk/credential-provider-http": "3.864.0", + "@aws-sdk/credential-provider-ini": "3.864.0", + "@aws-sdk/credential-provider-process": "3.864.0", + "@aws-sdk/credential-provider-sso": "3.864.0", + "@aws-sdk/credential-provider-web-identity": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/credential-provider-imds": "^4.0.7", + "@smithy/property-provider": "^4.0.5", + "@smithy/shared-ini-file-loader": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-process": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.864.0.tgz", + "integrity": "sha512-Zxnn1hxhq7EOqXhVYgkF4rI9MnaO3+6bSg/tErnBQ3F8kDpA7CFU24G1YxwaJXp2X4aX3LwthefmSJHwcVP/2g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/property-provider": "^4.0.5", + "@smithy/shared-ini-file-loader": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.864.0.tgz", + "integrity": "sha512-UPyPNQbxDwHVGmgWdGg9/9yvzuedRQVF5jtMkmP565YX9pKZ8wYAcXhcYdNPWFvH0GYdB0crKOmvib+bmCuwkw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.864.0", + "@aws-sdk/core": "3.864.0", + "@aws-sdk/token-providers": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/property-provider": "^4.0.5", + "@smithy/shared-ini-file-loader": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.864.0.tgz", + "integrity": "sha512-nNcjPN4SYg8drLwqK0vgVeSvxeGQiD0FxOaT38mV2H8cu0C5NzpvA+14Xy+W6vT84dxgmJYKk71Cr5QL2Oz+rA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.864.0", + "@aws-sdk/nested-clients": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/property-provider": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-host-header": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.862.0.tgz", + "integrity": "sha512-jDje8dCFeFHfuCAxMDXBs8hy8q9NCTlyK4ThyyfAj3U4Pixly2mmzY2u7b7AyGhWsjJNx8uhTjlYq5zkQPQCYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.862.0", + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-logger": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.862.0.tgz", + "integrity": "sha512-N/bXSJznNBR/i7Ofmf9+gM6dx/SPBK09ZWLKsW5iQjqKxAKn/2DozlnE54uiEs1saHZWoNDRg69Ww4XYYSlG1Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.862.0", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.862.0.tgz", + "integrity": "sha512-KVoo3IOzEkTq97YKM4uxZcYFSNnMkhW/qj22csofLegZi5fk90ztUnnaeKfaEJHfHp/tm1Y3uSoOXH45s++kKQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.862.0", + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.864.0.tgz", + "integrity": "sha512-wrddonw4EyLNSNBrApzEhpSrDwJiNfjxDm5E+bn8n32BbAojXASH8W8jNpxz/jMgNkkJNxCfyqybGKzBX0OhbQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@aws-sdk/util-endpoints": "3.862.0", + "@smithy/core": "^3.8.0", + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/nested-clients": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.864.0.tgz", + "integrity": "sha512-H1C+NjSmz2y8Tbgh7Yy89J20yD/hVyk15hNoZDbCYkXg0M358KS7KVIEYs8E2aPOCr1sK3HBE819D/yvdMgokA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.864.0", + "@aws-sdk/middleware-host-header": "3.862.0", + "@aws-sdk/middleware-logger": "3.862.0", + "@aws-sdk/middleware-recursion-detection": "3.862.0", + "@aws-sdk/middleware-user-agent": "3.864.0", + "@aws-sdk/region-config-resolver": "3.862.0", + "@aws-sdk/types": "3.862.0", + "@aws-sdk/util-endpoints": "3.862.0", + "@aws-sdk/util-user-agent-browser": "3.862.0", + "@aws-sdk/util-user-agent-node": "3.864.0", + "@smithy/config-resolver": "^4.1.5", + "@smithy/core": "^3.8.0", + "@smithy/fetch-http-handler": "^5.1.1", + "@smithy/hash-node": "^4.0.5", + "@smithy/invalid-dependency": "^4.0.5", + "@smithy/middleware-content-length": "^4.0.5", + "@smithy/middleware-endpoint": "^4.1.18", + "@smithy/middleware-retry": "^4.1.19", + "@smithy/middleware-serde": "^4.0.9", + "@smithy/middleware-stack": "^4.0.5", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/node-http-handler": "^4.1.1", + "@smithy/protocol-http": "^5.1.3", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "@smithy/url-parser": "^4.0.5", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.26", + "@smithy/util-defaults-mode-node": "^4.0.26", + "@smithy/util-endpoints": "^3.0.7", + "@smithy/util-middleware": "^4.0.5", + "@smithy/util-retry": "^4.0.7", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.862.0.tgz", + "integrity": "sha512-VisR+/HuVFICrBPY+q9novEiE4b3mvDofWqyvmxHcWM7HumTz9ZQSuEtnlB/92GVM3KDUrR9EmBHNRrfXYZkcQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.862.0", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/types": "^4.3.2", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/token-providers": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.864.0.tgz", + "integrity": "sha512-gTc2QHOBo05SCwVA65dUtnJC6QERvFaPiuppGDSxoF7O5AQNK0UR/kMSenwLqN8b5E1oLYvQTv3C1idJLRX0cg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.864.0", + "@aws-sdk/nested-clients": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/property-provider": "^4.0.5", + "@smithy/shared-ini-file-loader": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.862.0.tgz", + "integrity": "sha512-Bei+RL0cDxxV+lW2UezLbCYYNeJm6Nzee0TpW0FfyTRBhH9C1XQh4+x+IClriXvgBnRquTMMYsmJfvx8iyLKrg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-endpoints": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.862.0.tgz", + "integrity": "sha512-eCZuScdE9MWWkHGM2BJxm726MCmWk/dlHjOKvkM0sN1zxBellBMw5JohNss1Z8/TUmnW2gb9XHTOiHuGjOdksA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.862.0", + "@smithy/types": "^4.3.2", + "@smithy/url-parser": "^4.0.5", + "@smithy/util-endpoints": "^3.0.7", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-locate-window": { + "version": "3.804.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.804.0.tgz", + "integrity": "sha512-zVoRfpmBVPodYlnMjgVjfGoEZagyRF5IPn3Uo6ZvOZp24chnW/FRstH7ESDHDDRga4z3V+ElUQHKpFDXWyBW5A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.862.0.tgz", + "integrity": "sha512-BmPTlm0r9/10MMr5ND9E92r8KMZbq5ltYXYpVcUbAsnB1RJ8ASJuRoLne5F7mB3YMx0FJoOTuSq7LdQM3LgW3Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.862.0", + "@smithy/types": "^4.3.2", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.864.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.864.0.tgz", + "integrity": "sha512-d+FjUm2eJEpP+FRpVR3z6KzMdx1qwxEYDz8jzNKwxYLBBquaBaP/wfoMtMQKAcbrR7aT9FZVZF7zDgzNxUvQlQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-user-agent": "3.864.0", + "@aws-sdk/types": "3.862.0", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/util-utf8-browser": { + "version": "3.259.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", + "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.862.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.862.0.tgz", + "integrity": "sha512-6Ed0kmC1NMbuFTEgNmamAUU1h5gShgxL1hBVLbEzUa3trX5aJBz1vU4bXaBTvOYUAnOHtiy1Ml4AMStd6hJnFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@bytecodealliance/preview2-shim": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@bytecodealliance/preview2-shim/-/preview2-shim-0.17.0.tgz", + "integrity": "sha512-JorcEwe4ud0x5BS/Ar2aQWOQoFzjq/7jcnxYXCvSMh0oRm0dQXzOA+hqLDBnOMks1LLBA7dmiLLsEBl09Yd6iQ==", + "dev": true, + "license": "(Apache-2.0 WITH LLVM-exception)" + }, + "node_modules/@colors/colors": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", + "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-5.0.2.tgz", + "integrity": "sha512-DziebCdg4JpGlEqEdGgXmjqcFoJi+JGulUXwEjsZGAscAQ7MyD/7LE/GVCP29vEQxKc7AAwjT3A2ywHp2xfoCA==", + "dev": true, + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp.cjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/util": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-9.1.0.tgz", + "integrity": "sha512-XBEKsYqLGXLah9PNJbgdkigthkG7TAGvlD/sH12beMXEyHDyigfcbdvHhmLyDWgDyOJn4QwiQUaF7yeuhnjdog==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/rlp": "^5.0.2", + "ethereum-cryptography": "^2.2.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.8.0.tgz", + "integrity": "sha512-b9YS/43ObplgyV6SlyQsG53/vkSal0MNA1fskSC4mbnCMi8R+NkcH8K9FPYNESf6jUefBUniE4SOKms0E/KK1Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/hash": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.8.0.tgz", + "integrity": "sha512-wC9SFcmh4UK0oKuLJQItoQdzS/qZ51EJegK6EmAWlh+OptpQ/npECOR3QqECd8iGHC0RJb4WKbVdSfif4ammrg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/networks": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/transactions": "^5.8.0", + "@ethersproject/web": "^5.8.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.8.0.tgz", + "integrity": "sha512-N0XhZTswXcmIZQdYtUnd79VJzvEwXQw6PK0dTl9VoYrEBxxCPXqS0Eod7q5TNKRxe1/5WUMuR0u0nqTF/avdCA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-provider": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.8.0.tgz", + "integrity": "sha512-GhH/abcC46LJwshoN+uBNoKVFPxUuZm6dA257z0vZkKmU1+t8xTn8oK7B9qrj8W2rFRMch4gbJl6PmVxjxBEBA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/rlp": "^5.8.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.8.0.tgz", + "integrity": "sha512-lN0oIwfkYj9LbPx4xEkie6rAMJtySbpOAFXSDVQaBnAzYfB4X2Qr+FXJGxMoc3Bxp2Sm8OwvzMrywxyw0gLjIQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0" + } + }, + "node_modules/@ethersproject/bignumber": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.8.0.tgz", + "integrity": "sha512-ZyaT24bHaSeJon2tGPKIiHszWjD/54Sz8t57Toch475lCLljC6MgPmxk7Gtzz+ddNN5LuHea9qhAe0x3D+uYPA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "bn.js": "^5.2.1" + } + }, + "node_modules/@ethersproject/bytes": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", + "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/constants": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.8.0.tgz", + "integrity": "sha512-wigX4lrf5Vu+axVTIvNsuL6YrV4O5AXl5ubcURKMEME5TnWBouUh0CDTWxZ2GpnRn1kcCgE7l8O5+VbV9QTTcg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bignumber": "^5.8.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.8.0.tgz", + "integrity": "sha512-ac/lBcTbEWW/VGJij0CNSw/wPcw9bSRgCB0AIBz8CvED/jfvDoV9hsIIiWfvWmFEi8RcXtlNwp2jv6ozWOsooA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/abstract-signer": "^5.8.0", + "@ethersproject/address": "^5.8.0", + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@ethersproject/keccak256": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.8.0.tgz", + "integrity": "sha512-A1pkKLZSz8pDaQ1ftutZoaN46I6+jvuqugx5KYNeQOPqq+JZ0Txm7dlWesCHB5cndJSu5vP2VKptKf7cksERng==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/logger": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", + "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT" + }, + "node_modules/@ethersproject/networks": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.8.0.tgz", + "integrity": "sha512-egPJh3aPVAzbHwq8DD7Po53J4OUSsA1MjQp8Vf/OZPav5rlmWUaFLiq8cvQiGK0Z5K6LYzm29+VA/p4RL1FzNg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/properties": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.8.0.tgz", + "integrity": "sha512-PYuiEoQ+FMaZZNGrStmN7+lWjlsoufGIHdww7454FIaGdbe/p5rnaCXTr5MtBYl3NkeoVhHZuyzChPeGeKIpQw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.8.0.tgz", + "integrity": "sha512-LqZgAznqDbiEunaUvykH2JAoXTT9NV0Atqk8rQN9nx9SEgThA/WMx5DnW8a9FOufo//6FZOCHZ+XiClzgbqV9Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.8.0.tgz", + "integrity": "sha512-LrPW2ZxoigFi6U6aVkFN/fa9Yx/+4AtIUe4/HACTvKJdhm0eeb107EVCIQcrLZkxaSIgc/eCrX8Q1GtbH+9n3w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "bn.js": "^5.2.1", + "elliptic": "6.6.1", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz", + "integrity": "sha512-qWEAk0MAvl0LszjdfnZ2uC8xbR2wdv4cDabyHiBh3Cldq/T8dPH3V4BbBsAYJUeonwD+8afVXld274Ls+Y1xXg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/transactions": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.8.0.tgz", + "integrity": "sha512-UglxSDjByHG0TuU17bDfCemZ3AnKO2vYrL5/2n2oXvKzvb7Cz+W9gOWXKARjp2URVwcWlQlPOEQyAviKwT4AHg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/address": "^5.8.0", + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/keccak256": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/rlp": "^5.8.0", + "@ethersproject/signing-key": "^5.8.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz", + "integrity": "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.8.0", + "@ethersproject/constants": "^5.8.0", + "@ethersproject/logger": "^5.8.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.8.0.tgz", + "integrity": "sha512-j7+Ksi/9KfGviws6Qtf9Q7KCqRhpwrYKQPs+JBA/rKVFF/yaWLHJEH3zfVP2plVu+eys0d2DlFmhoQJayFewcw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "dependencies": { + "@ethersproject/base64": "^5.8.0", + "@ethersproject/bytes": "^5.8.0", + "@ethersproject/logger": "^5.8.0", + "@ethersproject/properties": "^5.8.0", + "@ethersproject/strings": "^5.8.0" + } + }, + "node_modules/@fastify/busboy": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", + "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@noble/ciphers": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", + "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/curves": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", + "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.3.2" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/hashes": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz", + "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nomicfoundation/edr": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr/-/edr-0.11.3.tgz", + "integrity": "sha512-kqILRkAd455Sd6v8mfP3C1/0tCOynJWY+Ir+k/9Boocu2kObCrsFgG+ZWB7fSBVdd9cPVSNrnhWS+V+PEo637g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nomicfoundation/edr-darwin-arm64": "0.11.3", + "@nomicfoundation/edr-darwin-x64": "0.11.3", + "@nomicfoundation/edr-linux-arm64-gnu": "0.11.3", + "@nomicfoundation/edr-linux-arm64-musl": "0.11.3", + "@nomicfoundation/edr-linux-x64-gnu": "0.11.3", + "@nomicfoundation/edr-linux-x64-musl": "0.11.3", + "@nomicfoundation/edr-win32-x64-msvc": "0.11.3" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-darwin-arm64": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.11.3.tgz", + "integrity": "sha512-w0tksbdtSxz9nuzHKsfx4c2mwaD0+l5qKL2R290QdnN9gi9AV62p9DHkOgfBdyg6/a6ZlnQqnISi7C9avk/6VA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-darwin-x64": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.11.3.tgz", + "integrity": "sha512-QR4jAFrPbOcrO7O2z2ESg+eUeIZPe2bPIlQYgiJ04ltbSGW27FblOzdd5+S3RoOD/dsZGKAvvy6dadBEl0NgoA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-arm64-gnu": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.11.3.tgz", + "integrity": "sha512-Ktjv89RZZiUmOFPspuSBVJ61mBZQ2+HuLmV67InNlh9TSUec/iDjGIwAn59dx0bF/LOSrM7qg5od3KKac4LJDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-arm64-musl": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.11.3.tgz", + "integrity": "sha512-B3sLJx1rL2E9pfdD4mApiwOZSrX0a/KQSBWdlq1uAhFKqkl00yZaY4LejgZndsJAa4iKGQJlGnw4HCGeVt0+jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-x64-gnu": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.11.3.tgz", + "integrity": "sha512-D/4cFKDXH6UYyKPu6J3Y8TzW11UzeQI0+wS9QcJzjlrrfKj0ENW7g9VihD1O2FvXkdkTjcCZYb6ai8MMTCsaVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-linux-x64-musl": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.11.3.tgz", + "integrity": "sha512-ergXuIb4nIvmf+TqyiDX5tsE49311DrBky6+jNLgsGDTBaN1GS3OFwFS8I6Ri/GGn6xOaT8sKu3q7/m+WdlFzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/edr-win32-x64-msvc": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.11.3.tgz", + "integrity": "sha512-snvEf+WB3OV0wj2A7kQ+ZQqBquMcrozSLXcdnMdEl7Tmn+KDCbmFKBt3Tk0X3qOU4RKQpLPnTxdM07TJNVtung==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 18" + } + }, + "node_modules/@nomicfoundation/hardhat-chai-matchers": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.1.0.tgz", + "integrity": "sha512-GPhBNafh1fCnVD9Y7BYvoLnblnvfcq3j8YDbO1gGe/1nOFWzGmV7gFu5DkwFXF+IpYsS+t96o9qc/mPu3V3Vfw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/chai-as-promised": "^7.1.3", + "chai-as-promised": "^7.1.1", + "deep-eql": "^4.0.1", + "ordinal": "^1.0.3" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "chai": "^4.2.0", + "ethers": "^6.14.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-ethers": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.1.0.tgz", + "integrity": "sha512-jx6fw3Ms7QBwFGT2MU6ICG292z0P81u6g54JjSV105+FbTZOF4FJqPksLfDybxkkOeq28eDxbqq7vpxRYyIlxA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "debug": "^4.1.1", + "lodash.isequal": "^4.5.0" + }, + "peerDependencies": { + "ethers": "^6.14.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-ignition": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition/-/hardhat-ignition-0.15.13.tgz", + "integrity": "sha512-G4XGPWvxs9DJhZ6PE1wdvKjHkjErWbsETf4c7YxO6GUz+MJGlw+PtgbnCwhL3tQzSq3oD4MB0LGi+sK0polpUA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nomicfoundation/ignition-core": "^0.15.13", + "@nomicfoundation/ignition-ui": "^0.15.12", + "chalk": "^4.0.0", + "debug": "^4.3.2", + "fs-extra": "^10.0.0", + "json5": "^2.2.3", + "prompts": "^2.4.2" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-verify": "^2.1.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-ignition-ethers": { + "version": "0.15.14", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-ignition-ethers/-/hardhat-ignition-ethers-0.15.14.tgz", + "integrity": "sha512-eq+5n+c1DW18/Xp8/QrHBBvG5QaKUxYF/byol4f1jrnZ1zAy0OrqEa/oaNFWchhpLalX7d7suk/2EL0PbT0CDQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition": "^0.15.13", + "@nomicfoundation/ignition-core": "^0.15.13", + "ethers": "^6.14.0", + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-network-helpers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.1.0.tgz", + "integrity": "sha512-ZS+NulZuR99NUHt2VwcgZvgeD6Y63qrbORNRuKO+lTowJxNVsrJ0zbRx1j5De6G3dOno5pVGvuYSq2QVG0qCYg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ethereumjs-util": "^7.1.4" + }, + "peerDependencies": { + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/hardhat-toolbox": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-6.1.0.tgz", + "integrity": "sha512-iAIl6pIK3F4R3JXeq+b6tiShXUrp1sQRiPfqoCMUE7QLUzoFifzGV97IDRL6e73pWsMKpUQBsHBvTCsqn+ZdpA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@nomicfoundation/hardhat-chai-matchers": "^2.1.0", + "@nomicfoundation/hardhat-ethers": "^3.1.0", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.14", + "@nomicfoundation/hardhat-network-helpers": "^1.1.0", + "@nomicfoundation/hardhat-verify": "^2.1.0", + "@typechain/ethers-v6": "^0.5.0", + "@typechain/hardhat": "^9.0.0", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", + "@types/node": ">=20.0.0", + "chai": "^4.2.0", + "ethers": "^6.14.0", + "hardhat": "^2.26.0", + "hardhat-gas-reporter": "^2.3.0", + "solidity-coverage": "^0.8.1", + "ts-node": ">=8.0.0", + "typechain": "^8.3.0", + "typescript": ">=4.5.0" + } + }, + "node_modules/@nomicfoundation/hardhat-verify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.1.1.tgz", + "integrity": "sha512-K1plXIS42xSHDJZRkrE2TZikqxp9T4y6jUMUNI/imLgN5uCcEQokmfU0DlyP9zzHncYK92HlT5IWP35UVCLrPw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@ethersproject/address": "^5.0.2", + "cbor": "^8.1.0", + "debug": "^4.1.1", + "lodash.clonedeep": "^4.5.0", + "picocolors": "^1.1.0", + "semver": "^6.3.0", + "table": "^6.8.0", + "undici": "^5.14.0" + }, + "peerDependencies": { + "hardhat": "^2.26.0" + } + }, + "node_modules/@nomicfoundation/ignition-core": { + "version": "0.15.13", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-core/-/ignition-core-0.15.13.tgz", + "integrity": "sha512-Z4T1WIbw0EqdsN9RxtnHeQXBi7P/piAmCu8bZmReIdDo/2h06qgKWxjDoNfc9VBFZJ0+Dx79tkgQR3ewxMDcpA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/address": "5.6.1", + "@nomicfoundation/solidity-analyzer": "^0.1.1", + "cbor": "^9.0.0", + "debug": "^4.3.2", + "ethers": "^6.14.0", + "fs-extra": "^10.0.0", + "immer": "10.0.2", + "lodash": "4.17.21", + "ndjson": "2.0.0" + } + }, + "node_modules/@nomicfoundation/ignition-core/node_modules/@ethersproject/address": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.1.tgz", + "integrity": "sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/bignumber": "^5.6.2", + "@ethersproject/bytes": "^5.6.1", + "@ethersproject/keccak256": "^5.6.1", + "@ethersproject/logger": "^5.6.0", + "@ethersproject/rlp": "^5.6.1" + } + }, + "node_modules/@nomicfoundation/ignition-core/node_modules/cbor": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.2.tgz", + "integrity": "sha512-JPypkxsB10s9QOWwa6zwPzqE1Md3vqpPc+cai4sAecuCsRyAtAl/pMyhPlMbT/xtPnm2dznJZYRLui57qiRhaQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@nomicfoundation/ignition-ui": { + "version": "0.15.12", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ignition-ui/-/ignition-ui-0.15.12.tgz", + "integrity": "sha512-nQl8tusvmt1ANoyIj5RQl9tVSEmG0FnNbtwnWbTim+F8JLm4YLHWS0yEgYUZC+BEO3oS0D8r6V8a02JGZJgqiQ==", + "dev": true, + "peer": true + }, + "node_modules/@nomicfoundation/slang": { + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang/-/slang-0.18.3.tgz", + "integrity": "sha512-YqAWgckqbHM0/CZxi9Nlf4hjk9wUNLC9ngWCWBiqMxPIZmzsVKYuChdlrfeBPQyvQQBoOhbx+7C1005kLVQDZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bytecodealliance/preview2-shim": "0.17.0" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.2.tgz", + "integrity": "sha512-q4n32/FNKIhQ3zQGGw5CvPF6GTvDCpYwIf7bEY/dZTZbgfDsHyjJwURxUJf3VQuuJj+fDIFl4+KkBVbw4Ef6jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + }, + "optionalDependencies": { + "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.2", + "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.2", + "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.2", + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.2" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-arm64": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.2.tgz", + "integrity": "sha512-JaqcWPDZENCvm++lFFGjrDd8mxtf+CtLd2MiXvMNTBD33dContTZ9TWETwNFwg7JTJT5Q9HEecH7FA+HTSsIUw==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-x64": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.2.tgz", + "integrity": "sha512-fZNmVztrSXC03e9RONBT+CiksSeYcxI1wlzqyr0L7hsQlK1fzV+f04g2JtQ1c/Fe74ZwdV6aQBdd6Uwl1052sw==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.2.tgz", + "integrity": "sha512-3d54oc+9ZVBuB6nbp8wHylk4xh0N0Gc+bk+/uJae+rUgbOBwQSfuGIbAZt1wBXs5REkSmynEGcqx6DutoK0tPA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-musl": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.2.tgz", + "integrity": "sha512-iDJfR2qf55vgsg7BtJa7iPiFAsYf2d0Tv/0B+vhtnI16+wfQeTbP7teookbGvAo0eJo7aLLm0xfS/GTkvHIucA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-gnu": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.2.tgz", + "integrity": "sha512-9dlHMAt5/2cpWyuJ9fQNOUXFB/vgSFORg1jpjX1Mh9hJ/MfZXlDdHQ+DpFCs32Zk5pxRBb07yGvSHk9/fezL+g==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-musl": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.2.tgz", + "integrity": "sha512-GzzVeeJob3lfrSlDKQw2bRJ8rBf6mEYaWY+gW0JnTDHINA0s2gPR4km5RLIj1xeZZOYz4zRw+AEeYgLRqB2NXg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-win32-x64-msvc": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.2.tgz", + "integrity": "sha512-Fdjli4DCcFHb4Zgsz0uEJXZ2K7VEO+w5KVv7HmT7WO10iODdU9csC2az4jrhEsRtiR9Gfd74FlG0NYlw1BMdyA==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/@openzeppelin/contracts": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz", + "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@openzeppelin/contracts-upgradeable": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.4.0.tgz", + "integrity": "sha512-STJKyDzUcYuB35Zub1JpWW58JxvrFFVgQ+Ykdr8A9PGXgtq/obF5uoh07k2XmFyPxfnZdPdBdhkJ/n2YxJ87HQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@openzeppelin/contracts": "5.4.0" + } + }, + "node_modules/@openzeppelin/defender-sdk-base-client": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/defender-sdk-base-client/-/defender-sdk-base-client-2.7.0.tgz", + "integrity": "sha512-J5IpvbFfdIJM4IadBcXfhCXVdX2yEpaZtRR1ecq87d8CdkmmEpniYfef/yVlG98yekvu125LaIRg0yXQOt9Bdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@aws-sdk/client-lambda": "^3.563.0", + "amazon-cognito-identity-js": "^6.3.6", + "async-retry": "^1.3.3" + } + }, + "node_modules/@openzeppelin/defender-sdk-deploy-client": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/defender-sdk-deploy-client/-/defender-sdk-deploy-client-2.7.0.tgz", + "integrity": "sha512-YOHZmnHmM1y6uSqXWGfk2/5/ae4zZJE6xG92yFEAIOy8vqh1dxznWMsoCcAXRXTCWc8RdCDpFdMfEy4SBTyYtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@openzeppelin/defender-sdk-base-client": "^2.7.0", + "axios": "^1.7.4", + "lodash": "^4.17.21" + } + }, + "node_modules/@openzeppelin/defender-sdk-network-client": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/defender-sdk-network-client/-/defender-sdk-network-client-2.7.0.tgz", + "integrity": "sha512-4CYWPa9+kSjojE5KS7kRmP161qsBATdp97TCrzyDdGoVahj0GyqgafRL9AAjm0eHZOM1c7EIYEpbvYRtFi8vyA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@openzeppelin/defender-sdk-base-client": "^2.7.0", + "axios": "^1.7.4", + "lodash": "^4.17.21" + } + }, + "node_modules/@openzeppelin/hardhat-upgrades": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-3.9.1.tgz", + "integrity": "sha512-pSDjlOnIpP+PqaJVe144dK6VVKZw2v6YQusyt0OOLiCsl+WUzfo4D0kylax7zjrOxqy41EK2ipQeIF4T+cCn2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@openzeppelin/defender-sdk-base-client": "^2.1.0", + "@openzeppelin/defender-sdk-deploy-client": "^2.1.0", + "@openzeppelin/defender-sdk-network-client": "^2.1.0", + "@openzeppelin/upgrades-core": "^1.41.0", + "chalk": "^4.1.0", + "debug": "^4.1.1", + "ethereumjs-util": "^7.1.5", + "proper-lockfile": "^4.1.1", + "undici": "^6.11.1" + }, + "bin": { + "migrate-oz-cli-project": "dist/scripts/migrate-oz-cli-project.js" + }, + "peerDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.0.6", + "@nomicfoundation/hardhat-verify": "^2.0.14", + "ethers": "^6.6.0", + "hardhat": "^2.24.1" + }, + "peerDependenciesMeta": { + "@nomicfoundation/hardhat-verify": { + "optional": true + } + } + }, + "node_modules/@openzeppelin/hardhat-upgrades/node_modules/undici": { + "version": "6.21.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", + "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, + "node_modules/@openzeppelin/upgrades-core": { + "version": "1.44.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.44.1.tgz", + "integrity": "sha512-yqvDj7eC7m5kCDgqCxVFgk9sVo9SXP/fQFaExPousNfAJJbX+20l4fKZp17aXbNTpo1g+2205s6cR9VhFFOCaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nomicfoundation/slang": "^0.18.3", + "bignumber.js": "^9.1.2", + "cbor": "^10.0.0", + "chalk": "^4.1.0", + "compare-versions": "^6.0.0", + "debug": "^4.1.1", + "ethereumjs-util": "^7.0.3", + "minimatch": "^9.0.5", + "minimist": "^1.2.7", + "proper-lockfile": "^4.1.1", + "solidity-ast": "^0.4.60" + }, + "bin": { + "openzeppelin-upgrades-core": "dist/cli/cli.js" + } + }, + "node_modules/@openzeppelin/upgrades-core/node_modules/cbor": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-10.0.10.tgz", + "integrity": "sha512-EirvzAg0G4okCsdTfTjLWHU+tToQ2V2ptO3577Vyy2GOTeVJad99uCIuDqdK7ppFRRcEuigyJY6TJ59wv5JpSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "nofilter": "^3.0.2" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.6.tgz", + "integrity": "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@sentry/core": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", + "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/core/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/hub": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", + "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/hub/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/minimal": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", + "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/minimal/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/node": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", + "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/core": "5.30.0", + "@sentry/hub": "5.30.0", + "@sentry/tracing": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/node/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/tracing": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", + "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/tracing/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/@smithy/abort-controller": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.5.tgz", + "integrity": "sha512-jcrqdTQurIrBbUm4W2YdLVMQDoL0sA9DTxYd2s+R/y+2U9NLOP7Xf/YqfSg1FZhlZIYEnvk2mwbyvIfdLEPo8g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/config-resolver": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.1.5.tgz", + "integrity": "sha512-viuHMxBAqydkB0AfWwHIdwf/PRH2z5KHGUzqyRtS/Wv+n3IHI993Sk76VCA7dD/+GzgGOmlJDITfPcJC1nIVIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.1.4", + "@smithy/types": "^4.3.2", + "@smithy/util-config-provider": "^4.0.0", + "@smithy/util-middleware": "^4.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/core": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.8.0.tgz", + "integrity": "sha512-EYqsIYJmkR1VhVE9pccnk353xhs+lB6btdutJEtsp7R055haMJp2yE16eSxw8fv+G0WUY6vqxyYOP8kOqawxYQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/middleware-serde": "^4.0.9", + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.5", + "@smithy/util-stream": "^4.2.4", + "@smithy/util-utf8": "^4.0.0", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/credential-provider-imds": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.7.tgz", + "integrity": "sha512-dDzrMXA8d8riFNiPvytxn0mNwR4B3h8lgrQ5UjAGu6T9z/kRg/Xncf4tEQHE/+t25sY8IH3CowcmWi+1U5B1Gw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.1.4", + "@smithy/property-provider": "^4.0.5", + "@smithy/types": "^4.3.2", + "@smithy/url-parser": "^4.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-codec": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.0.5.tgz", + "integrity": "sha512-miEUN+nz2UTNoRYRhRqVTJCx7jMeILdAurStT2XoS+mhokkmz1xAPp95DFW9Gxt4iF2VBqpeF9HbTQ3kY1viOA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/crc32": "5.2.0", + "@smithy/types": "^4.3.2", + "@smithy/util-hex-encoding": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.0.5.tgz", + "integrity": "sha512-LCUQUVTbM6HFKzImYlSB9w4xafZmpdmZsOh9rIl7riPC3osCgGFVP+wwvYVw6pXda9PPT9TcEZxaq3XE81EdJQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.1.3.tgz", + "integrity": "sha512-yTTzw2jZjn/MbHu1pURbHdpjGbCuMHWncNBpJnQAPxOVnFUAbSIUSwafiphVDjNV93TdBJWmeVAds7yl5QCkcA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.0.5.tgz", + "integrity": "sha512-lGS10urI4CNzz6YlTe5EYG0YOpsSp3ra8MXyco4aqSkQDuyZPIw2hcaxDU82OUVtK7UY9hrSvgWtpsW5D4rb4g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-serde-universal": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.0.5.tgz", + "integrity": "sha512-JFnmu4SU36YYw3DIBVao3FsJh4Uw65vVDIqlWT4LzR6gXA0F3KP0IXFKKJrhaVzCBhAuMsrUUaT5I+/4ZhF7aw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/eventstream-codec": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/fetch-http-handler": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.1.1.tgz", + "integrity": "sha512-61WjM0PWmZJR+SnmzaKI7t7G0UkkNFboDpzIdzSoy7TByUzlxo18Qlh9s71qug4AY4hlH/CwXdubMtkcNEb/sQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.1.3", + "@smithy/querystring-builder": "^4.0.5", + "@smithy/types": "^4.3.2", + "@smithy/util-base64": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/hash-node": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.5.tgz", + "integrity": "sha512-cv1HHkKhpyRb6ahD8Vcfb2Hgz67vNIXEp2vnhzfxLFGRukLCNEA5QdsorbUEzXma1Rco0u3rx5VTqbM06GcZqQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/invalid-dependency": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.5.tgz", + "integrity": "sha512-IVnb78Qtf7EJpoEVo7qJ8BEXQwgC4n3igeJNNKEj/MLYtapnx8A67Zt/J3RXAj2xSO1910zk0LdFiygSemuLow==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/is-array-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.0.0.tgz", + "integrity": "sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-content-length": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.5.tgz", + "integrity": "sha512-l1jlNZoYzoCC7p0zCtBDE5OBXZ95yMKlRlftooE5jPWQn4YBPLgsp+oeHp7iMHaTGoUdFqmHOPa8c9G3gBsRpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "4.1.18", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.18.tgz", + "integrity": "sha512-ZhvqcVRPZxnZlokcPaTwb+r+h4yOIOCJmx0v2d1bpVlmP465g3qpVSf7wxcq5zZdu4jb0H4yIMxuPwDJSQc3MQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.8.0", + "@smithy/middleware-serde": "^4.0.9", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/shared-ini-file-loader": "^4.0.5", + "@smithy/types": "^4.3.2", + "@smithy/url-parser": "^4.0.5", + "@smithy/util-middleware": "^4.0.5", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-retry": { + "version": "4.1.19", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.19.tgz", + "integrity": "sha512-X58zx/NVECjeuUB6A8HBu4bhx72EoUz+T5jTMIyeNKx2lf+Gs9TmWPNNkH+5QF0COjpInP/xSpJGJ7xEnAklQQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.1.4", + "@smithy/protocol-http": "^5.1.3", + "@smithy/service-error-classification": "^4.0.7", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "@smithy/util-middleware": "^4.0.5", + "@smithy/util-retry": "^4.0.7", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-serde": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.9.tgz", + "integrity": "sha512-uAFFR4dpeoJPGz8x9mhxp+RPjo5wW0QEEIPPPbLXiRRWeCATf/Km3gKIVR5vaP8bN1kgsPhcEeh+IZvUlBv6Xg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/middleware-stack": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.5.tgz", + "integrity": "sha512-/yoHDXZPh3ocRVyeWQFvC44u8seu3eYzZRveCMfgMOBcNKnAmOvjbL9+Cp5XKSIi9iYA9PECUuW2teDAk8T+OQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-config-provider": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.4.tgz", + "integrity": "sha512-+UDQV/k42jLEPPHSn39l0Bmc4sB1xtdI9Gd47fzo/0PbXzJ7ylgaOByVjF5EeQIumkepnrJyfx86dPa9p47Y+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.0.5", + "@smithy/shared-ini-file-loader": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-http-handler": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.1.1.tgz", + "integrity": "sha512-RHnlHqFpoVdjSPPiYy/t40Zovf3BBHc2oemgD7VsVTFFZrU5erFFe0n52OANZZ/5sbshgD93sOh5r6I35Xmpaw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.0.5", + "@smithy/protocol-http": "^5.1.3", + "@smithy/querystring-builder": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/property-provider": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.5.tgz", + "integrity": "sha512-R/bswf59T/n9ZgfgUICAZoWYKBHcsVDurAGX88zsiUtOTA/xUAPyiT+qkNCPwFn43pZqN84M4MiUsbSGQmgFIQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/protocol-http": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.3.tgz", + "integrity": "sha512-fCJd2ZR7D22XhDY0l+92pUag/7je2BztPRQ01gU5bMChcyI0rlly7QFibnYHzcxDvccMjlpM/Q1ev8ceRIb48w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-builder": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.5.tgz", + "integrity": "sha512-NJeSCU57piZ56c+/wY+AbAw6rxCCAOZLCIniRE7wqvndqxcKKDOXzwWjrY7wGKEISfhL9gBbAaWWgHsUGedk+A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "@smithy/util-uri-escape": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/querystring-parser": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.5.tgz", + "integrity": "sha512-6SV7md2CzNG/WUeTjVe6Dj8noH32r4MnUeFKZrnVYsQxpGSIcphAanQMayi8jJLZAWm6pdM9ZXvKCpWOsIGg0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/service-error-classification": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.7.tgz", + "integrity": "sha512-XvRHOipqpwNhEjDf2L5gJowZEm5nsxC16pAZOeEcsygdjv9A2jdOh3YoDQvOXBGTsaJk6mNWtzWalOB9976Wlg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/shared-ini-file-loader": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.5.tgz", + "integrity": "sha512-YVVwehRDuehgoXdEL4r1tAAzdaDgaC9EQvhK0lEbfnbrd0bd5+CTQumbdPryX3J2shT7ZqQE+jPW4lmNBAB8JQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/signature-v4": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.3.tgz", + "integrity": "sha512-mARDSXSEgllNzMw6N+mC+r1AQlEBO3meEAkR/UlfAgnMzJUB3goRBWgip1EAMG99wh36MDqzo86SfIX5Y+VEaw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^4.0.0", + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-middleware": "^4.0.5", + "@smithy/util-uri-escape": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/smithy-client": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.10.tgz", + "integrity": "sha512-iW6HjXqN0oPtRS0NK/zzZ4zZeGESIFcxj2FkWed3mcK8jdSdHzvnCKXSjvewESKAgGKAbJRA+OsaqKhkdYRbQQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^3.8.0", + "@smithy/middleware-endpoint": "^4.1.18", + "@smithy/middleware-stack": "^4.0.5", + "@smithy/protocol-http": "^5.1.3", + "@smithy/types": "^4.3.2", + "@smithy/util-stream": "^4.2.4", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/types": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.2.tgz", + "integrity": "sha512-QO4zghLxiQ5W9UZmX2Lo0nta2PuE1sSrXUYDoaB6HMR762C0P7v/HEPHf6ZdglTVssJG1bsrSBxdc3quvDSihw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/url-parser": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.5.tgz", + "integrity": "sha512-j+733Um7f1/DXjYhCbvNXABV53NyCRRA54C7bNEIxNPs0YjfRxeMKjjgm2jvTYrciZyCjsicHwQ6Q0ylo+NAUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/querystring-parser": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-base64": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", + "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.0.0.tgz", + "integrity": "sha512-sNi3DL0/k64/LO3A256M+m3CDdG6V7WKWHdAiBBMUN8S3hK3aMPhwnPik2A/a2ONN+9doY9UxaLfgqsIRg69QA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-body-length-node": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.0.0.tgz", + "integrity": "sha512-q0iDP3VsZzqJyje8xJWEJCNIu3lktUGVoSy1KB0UWym2CL1siV3artm+u1DFYTLejpsrdGyCSWBdGNjJzfDPjg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-buffer-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.0.0.tgz", + "integrity": "sha512-9TOQ7781sZvddgO8nxueKi3+yGvkY35kotA0Y6BWRajAv8jjmigQ1sBwz0UX47pQMYXJPahSKEKYFgt+rXdcug==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/is-array-buffer": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-config-provider": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.0.0.tgz", + "integrity": "sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-browser": { + "version": "4.0.26", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.26.tgz", + "integrity": "sha512-xgl75aHIS/3rrGp7iTxQAOELYeyiwBu+eEgAk4xfKwJJ0L8VUjhO2shsDpeil54BOFsqmk5xfdesiewbUY5tKQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/property-provider": "^4.0.5", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-defaults-mode-node": { + "version": "4.0.26", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.26.tgz", + "integrity": "sha512-z81yyIkGiLLYVDetKTUeCZQ8x20EEzvQjrqJtb/mXnevLq2+w3XCEWTJ2pMp401b6BkEkHVfXb/cROBpVauLMQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/config-resolver": "^4.1.5", + "@smithy/credential-provider-imds": "^4.0.7", + "@smithy/node-config-provider": "^4.1.4", + "@smithy/property-provider": "^4.0.5", + "@smithy/smithy-client": "^4.4.10", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-endpoints": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.7.tgz", + "integrity": "sha512-klGBP+RpBp6V5JbrY2C/VKnHXn3d5V2YrifZbmMY8os7M6m8wdYFoO6w/fe5VkP+YVwrEktW3IWYaSQVNZJ8oQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/node-config-provider": "^4.1.4", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-hex-encoding": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.0.0.tgz", + "integrity": "sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-middleware": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.5.tgz", + "integrity": "sha512-N40PfqsZHRSsByGB81HhSo+uvMxEHT+9e255S53pfBw/wI6WKDI7Jw9oyu5tJTLwZzV5DsMha3ji8jk9dsHmQQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-retry": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.7.tgz", + "integrity": "sha512-TTO6rt0ppK70alZpkjwy+3nQlTiqNfoXja+qwuAchIEAIoSZW8Qyd76dvBv3I5bCpE38APafG23Y/u270NspiQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/service-error-classification": "^4.0.7", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-stream": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.4.tgz", + "integrity": "sha512-vSKnvNZX2BXzl0U2RgCLOwWaAP9x/ddd/XobPK02pCbzRm5s55M53uwb1rl/Ts7RXZvdJZerPkA+en2FDghLuQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/fetch-http-handler": "^5.1.1", + "@smithy/node-http-handler": "^4.1.1", + "@smithy/types": "^4.3.2", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-uri-escape": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.0.0.tgz", + "integrity": "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-utf8": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", + "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/util-buffer-from": "^4.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/util-waiter": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.0.7.tgz", + "integrity": "sha512-mYqtQXPmrwvUljaHyGxYUIIRI3qjBTEb/f5QFi3A6VlxhpmZd5mWXn9W+qUkf2pVE1Hv3SqxefiZOPGdxmO64A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.0.5", + "@smithy/types": "^4.3.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@solidity-parser/parser": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.20.2.tgz", + "integrity": "sha512-rbu0bzwNvMcwAjH86hiEAcOeRI2EeK8zCkHDrFykh/Al8mvJeFmjy3UrE7GYQjNwOgbGUUtCn5/k8CB8zIu7QA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@typechain/ethers-v6": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz", + "integrity": "sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" + }, + "peerDependencies": { + "ethers": "6.x", + "typechain": "^8.3.2", + "typescript": ">=4.7.0" + } + }, + "node_modules/@typechain/hardhat": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-9.1.0.tgz", + "integrity": "sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fs-extra": "^9.1.0" + }, + "peerDependencies": { + "@typechain/ethers-v6": "^0.5.1", + "ethers": "^6.1.0", + "hardhat": "^2.9.9", + "typechain": "^8.3.2" + } + }, + "node_modules/@typechain/hardhat/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@types/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-DLbJ1BPqxvQhIGbeu8VbUC1DiAiahHtAYvA0ZEAa4P31F7IaArc8z3C3BRQdWX4mtLQuABG4yzp76ZrS02Ui1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "4.3.20", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.20.tgz", + "integrity": "sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.8", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz", + "integrity": "sha512-ThlRVIJhr69FLlh6IctTXFkmhtP3NpMZ2QGq69StYLyKZFp/HOp1VdKZj7RvfNWYYcJ1xlbLGLLWj1UvP5u/Gw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/mocha": { + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/prettier": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", + "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@types/secp256k1": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", + "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/uuid": { + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true, + "license": "MIT" + }, + "node_modules/abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/abitype": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.8.tgz", + "integrity": "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/wevm" + }, + "peerDependencies": { + "typescript": ">=5.0.4", + "zod": "^3 >=3.22.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.3.0" + } + }, + "node_modules/aes-js": { + "version": "4.0.0-beta.5", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", + "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/amazon-cognito-identity-js": { + "version": "6.3.15", + "resolved": "https://registry.npmjs.org/amazon-cognito-identity-js/-/amazon-cognito-identity-js-6.3.15.tgz", + "integrity": "sha512-G2mzTlGYHKYh9oZDO0Gk94xVQ4iY9GYWBaYScbDYvz05ps6dqi0IvdNx1Lxi7oA3tjS5X+mUN7/svFJJdOB9YA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-js": "1.2.2", + "buffer": "4.9.2", + "fast-base64-decode": "^1.0.0", + "isomorphic-unfetch": "^3.0.0", + "js-cookie": "^2.2.1" + } + }, + "node_modules/amazon-cognito-identity-js/node_modules/@aws-crypto/sha256-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-1.2.2.tgz", + "integrity": "sha512-Nr1QJIbW/afYYGzYvrF70LtaHrIRtd4TNAglX8BvlfxJLZ45SAmueIKYl5tWoNBPzp65ymXGFK0Bb1vZUpuc9g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/util": "^1.2.2", + "@aws-sdk/types": "^3.1.0", + "tslib": "^1.11.1" + } + }, + "node_modules/amazon-cognito-identity-js/node_modules/@aws-crypto/util": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-1.2.2.tgz", + "integrity": "sha512-H8PjG5WJ4wz0UXAFXeJjWCW1vkvIJ3qUUD+rGRwJ2/hj+xT58Qle2MTql/2MGzkU+1JLAFuR6aJpLAjHwhmwwg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.1.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/amazon-cognito-identity-js/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "license": "0BSD" + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", + "dev": true, + "license": "BSD-3-Clause OR MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.1.0" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/async-retry": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", + "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "retry": "0.13.1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axios": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", + "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.4", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/base-x": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz", + "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/blakejs": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bn.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz", + "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/bowser": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.12.0.tgz", + "integrity": "sha512-HcOcTudTeEWgbHh0Y1Tyb6fdeR71m4b/QACf0D4KswGTsNeIJQmg38mRENZPAYPZvGFN3fk3604XbQEPdxXdKg==", + "dev": true, + "license": "MIT" + }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/brotli-wasm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brotli-wasm/-/brotli-wasm-2.0.1.tgz", + "integrity": "sha512-+3USgYsC7bzb5yU0/p2HnnynZl0ak0E6uoIm4UW4Aby/8s8HFCq6NCfrrf1E9c3O8OCSzq3oYO1tUVqIi61Nww==", + "dev": true, + "license": "Apache-2.0", + "peer": true + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true, + "license": "ISC" + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=12.19" + } + }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.2.tgz", + "integrity": "sha512-aBDHZxRzYnUYuIAIPBH2s511DjlKPzXNlXSGFC8CwmroWQLfrW0LtE1nK3MAwwNhJPa9raEjNCmRoFpG0Hurdw==", + "dev": true, + "license": "WTFPL", + "peer": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cipher-base": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", + "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true, + "license": "MIT" + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/command-line-usage/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/command-line-usage/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/command-line-usage/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/compare-versions": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", + "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", + "dev": true, + "peer": true + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/difflib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", + "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", + "dev": true, + "peer": true, + "dependencies": { + "heap": ">= 0.2.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/elliptic": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", + "integrity": "sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.2.tgz", + "integrity": "sha512-n4DSx829VRTRByMRGdjQ9iqsN0Bh4OolPsFnaZBLcbi8iXcB+kJ9s7EnRt4wILZNV3kPLHkRVfOc/HvhC3ovDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "dependencies": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" + } + }, + "node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ethereum-bloom-filters": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.2.0.tgz", + "integrity": "sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "^1.4.0" + } + }, + "node_modules/ethereum-bloom-filters/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ethers": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.15.0.tgz", + "integrity": "sha512-Kf/3ZW54L4UT0pZtsY/rf+EkBU7Qi5nnhonjUb8yTXcxH3cdcWrV2cRyk0Xk/4jK6OoHhxxZHriyhje20If2hQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/ethers-io/" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@adraffy/ens-normalize": "1.10.1", + "@noble/curves": "1.2.0", + "@noble/hashes": "1.3.2", + "@types/node": "22.7.5", + "aes-js": "4.0.0-beta.5", + "tslib": "2.7.0", + "ws": "8.17.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ethers/node_modules/@types/node": { + "version": "22.7.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz", + "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/ethers/node_modules/tslib": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true, + "license": "0BSD", + "peer": true + }, + "node_modules/ethers/node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha512-/Sn9Y0oKl0uqQuvgFk/zQgR7aw1g36qX/jzSQ5lSwlO0GigPymk4eGQfeNTD03w1dPOqfz8V77Cy43jH56pagw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/fast-base64-decode": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-base64-decode/-/fast-base64-decode-1.0.0.tgz", + "integrity": "sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/fast-uri": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", + "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/fast-xml-parser": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.5.tgz", + "integrity": "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "strnum": "^2.1.0" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "dev": true, + "license": "MIT" + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" + }, + "bin": { + "testrpc-sc": "index.js" + } + }, + "node_modules/ghost-testrpc/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/ghost-testrpc/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/ghost-testrpc/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/ghost-testrpc/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ghost-testrpc/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/globby/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/globby/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/globby/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hardhat": { + "version": "2.26.3", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.26.3.tgz", + "integrity": "sha512-gBfjbxCCEaRgMCRgTpjo1CEoJwqNPhyGMMVHYZJxoQ3LLftp2erSVf8ZF6hTQC0r2wst4NcqNmLWqMnHg1quTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ethereumjs/util": "^9.1.0", + "@ethersproject/abi": "^5.1.2", + "@nomicfoundation/edr": "^0.11.3", + "@nomicfoundation/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "boxen": "^5.1.2", + "chokidar": "^4.0.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "find-up": "^5.0.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "json-stream-stringify": "^3.1.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "micro-eth-signer": "^0.14.0", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "picocolors": "^1.1.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.8.26", + "source-map-support": "^0.5.13", + "stacktrace-parser": "^0.1.10", + "tinyglobby": "^0.2.6", + "tsort": "0.0.1", + "undici": "^5.14.0", + "uuid": "^8.3.2", + "ws": "^7.4.6" + }, + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/hardhat-gas-reporter": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-2.3.0.tgz", + "integrity": "sha512-ySdA+044xMQv1BlJu5CYXToHzMexKFfIWxlQTBNNoerx1x96+d15IMdN01iQZ/TJ7NH2V5sU73bz77LoS/PEVw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/units": "^5.7.0", + "@solidity-parser/parser": "^0.20.1", + "axios": "^1.6.7", + "brotli-wasm": "^2.0.1", + "chalk": "4.1.2", + "cli-table3": "^0.6.3", + "ethereum-cryptography": "^2.1.3", + "glob": "^10.3.10", + "jsonschema": "^1.4.1", + "lodash": "^4.17.21", + "markdown-table": "2.0.0", + "sha1": "^1.1.1", + "viem": "^2.27.0" + }, + "peerDependencies": { + "hardhat": "^2.16.0" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat-gas-reporter/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT" + }, + "node_modules/hardhat/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/hardhat/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/hardhat/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/hardhat/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/hardhat/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/hardhat/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/hardhat/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "node_modules/heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/immer": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/immer/-/immer-10.0.2.tgz", + "integrity": "sha512-Rx3CqeqQ19sxUtYV9CU911Vhy8/721wRFnJv3REVGWUmoAcIwzifTsdmJte/MV+0/XpM35LZdQMBGkRIoLPwQA==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true, + "license": "MIT" + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fp-ts": "^1.0.0" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/isomorphic-unfetch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", + "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-fetch": "^2.6.1", + "unfetch": "^4.2.0" + } + }, + "node_modules/isows": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.7.tgz", + "integrity": "sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "peerDependencies": { + "ws": "*" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/js-cookie": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz", + "integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/json-stream-stringify": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/json-stream-stringify/-/json-stream-stringify-3.1.6.tgz", + "integrity": "sha512-x7fpwxOkbhFCaJDJ8vb1fBY3DdSa4AlITaz+HHILQJzdPMnHEFjxPwVUi1ALIbcIxDE0PNe/0i7frnY8QnBQog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=7.10.1" + } + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonschema": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.5.0.tgz", + "integrity": "sha512-K+A9hhqbn0f3pJX17Q/7H6yQfD/5OXgdrR5UE12gMXCiN9D5Xq2o5mddV2QEcX/bjla99ASsAAQUyMCCRWAEhw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/keccak": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.4.tgz", + "integrity": "sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC", + "peer": true + }, + "node_modules/markdown-table": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz", + "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "repeat-string": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micro-eth-signer": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/micro-eth-signer/-/micro-eth-signer-0.14.0.tgz", + "integrity": "sha512-5PLLzHiVYPWClEvZIXXFu5yutzpadb73rnQCpUqIHu3No3coFuWQNfE5tkBQJ7djuLYl6aRLaS0MgWJYGoqiBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.8.1", + "@noble/hashes": "~1.7.1", + "micro-packed": "~0.7.2" + } + }, + "node_modules/micro-eth-signer/node_modules/@noble/curves": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.2.tgz", + "integrity": "sha512-vnI7V6lFNe0tLAuJMu+2sX+FcL14TaCWy1qiczg1VwRmPrpQCdq5ESXQMqUc2tluRNf6irBXrWbl1mGN8uaU/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@noble/hashes": "1.7.2" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micro-eth-signer/node_modules/@noble/hashes": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.2.tgz", + "integrity": "sha512-biZ0NUSxyjLLqo6KxEJ1b+C2NAx0wtDoFvCaXHGgUkeHzf3Xc1xKumFKREuT7f7DARNZ/slvYUwFG6B0f2b6hQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/micro-packed": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/micro-packed/-/micro-packed-0.7.3.tgz", + "integrity": "sha512-2Milxs+WNC00TRlem41oRswvw31146GiSaoCT7s3Xi2gMUglW5QBeqlQaZeHr5tJx9nm3i57LNXPqxOOaWtTYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@scure/base": "~1.2.5" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true, + "license": "MIT" + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "obliterator": "^2.0.0" + } + }, + "node_modules/mocha": { + "version": "10.8.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.8.2.tgz", + "integrity": "sha512-VZlYo/WE8t1tstuRmqgeyBgCbJc/lEdopaa+axcKzTBJ+UIdlAB9XnmvTCAH4pwR4ElNInaedhEBmZD8iCSVEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ndjson": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ndjson/-/ndjson-2.0.0.tgz", + "integrity": "sha512-nGl7LRGrzugTtaFcJMhLbpzJM6XdivmbkdlaGcrk/LXg2KL/YBC6z1g70xh0/al+oFuVFP8N8kiWRucmeEH/qQ==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "json-stringify-safe": "^5.0.1", + "minimist": "^1.2.5", + "readable-stream": "^3.6.0", + "split2": "^3.0.0", + "through2": "^4.0.0" + }, + "bin": { + "ndjson": "cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "dev": true, + "license": "MIT", + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.19" + } + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha512-wsJ9gfSz1/s4ZsJN01lyonwuxA1tml6X1yBDnfpMglypcBRFZZkus26EdPSlqS5GJfYddVZa22p3VNb3z5m5Ig==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/obliterator": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.5.tgz", + "integrity": "sha512-42CPE9AhahZRsMNslczq0ctAEtqk8Eka26QofnqC346BZdHDySk3LWka23LI7ULIw11NmltpiLagIq8gBozxTw==", + "dev": true, + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ox": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/ox/-/ox-0.8.6.tgz", + "integrity": "sha512-eiKcgiVVEGDtEpEdFi1EGoVVI48j6icXHce9nFwCNM7CKG3uoCXKdr4TPhS00Iy1TR2aWSF1ltPD0x/YgqIL9w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@adraffy/ens-normalize": "^1.11.0", + "@noble/ciphers": "^1.3.0", + "@noble/curves": "^1.9.1", + "@noble/hashes": "^1.8.0", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", + "abitype": "^1.0.8", + "eventemitter3": "5.0.1" + }, + "peerDependencies": { + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/ox/node_modules/@adraffy/ens-normalize": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz", + "integrity": "sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/ox/node_modules/@noble/curves": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.6.tgz", + "integrity": "sha512-GIKz/j99FRthB8icyJQA51E8Uk5hXmdyThjgQXRKiv9h0zeRlzSCLIzFw6K1LotZ3XuB7yzlf76qk7uBmTdFqA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ox/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0", + "peer": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "peer": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", + "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "create-hash": "~1.1.3", + "create-hmac": "^1.1.7", + "ripemd160": "=2.0.1", + "safe-buffer": "^5.2.1", + "sha.js": "^2.4.11", + "to-buffer": "^1.2.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/pbkdf2/node_modules/create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "sha.js": "^2.4.0" + } + }, + "node_modules/pbkdf2/node_modules/hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1" + } + }, + "node_modules/pbkdf2/node_modules/ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^2.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/proper-lockfile/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/proper-lockfile/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "dev": true, + "peer": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/recursive-readdir": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.3.tgz", + "integrity": "sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/recursive-readdir/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/recursive-readdir/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/retry": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", + "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/rlp": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", + "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "bn.js": "^5.2.0" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/sc-istanbul": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", + "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" + } + }, + "node_modules/sc-istanbul/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/sc-istanbul/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/sc-istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sc-istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sc-istanbul/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/sc-istanbul/node_modules/js-yaml/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sc-istanbul/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sc-istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/sc-istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sc-istanbul/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true, + "license": "MIT" + }, + "node_modules/secp256k1": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.4.tgz", + "integrity": "sha512-6JfvwvjUOn8F/jUoBY2Q1v5WY5XS+rj8qSe0v8Y4ezH4InLgTEeOOPQsRll9OV429Pvo6BCHGavIyJfr3TAhsw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "elliptic": "^6.5.7", + "node-addon-api": "^5.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/secp256k1/node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "dev": true, + "license": "MIT" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true, + "license": "ISC" + }, + "node_modules/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "dev": true, + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/shelljs/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/shelljs/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/shelljs/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/solc": { + "version": "0.8.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.26.tgz", + "integrity": "sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/solidity-ast": { + "version": "0.4.60", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.60.tgz", + "integrity": "sha512-UwhasmQ37ji1ul8cIp0XlrQ/+SVQhy09gGqJH4jnwdo2TgI6YIByzi0PI5QvIGcIdFOs1pbSmJW1pnWB7AVh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/solidity-coverage": { + "version": "0.8.16", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.16.tgz", + "integrity": "sha512-qKqgm8TPpcnCK0HCDLJrjbOA2tQNEJY4dHX/LSSQ9iwYFS973MwjtgYn2Iv3vfCEQJTj5xtm4cuUMzlJsJSMbg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.20.1", + "chalk": "^2.4.2", + "death": "^1.1.0", + "difflib": "^0.2.4", + "fs-extra": "^8.1.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.21", + "mocha": "^10.2.0", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "semver": "^7.3.4", + "shelljs": "^0.8.3", + "web3-utils": "^1.3.6" + }, + "bin": { + "solidity-coverage": "plugins/bin.js" + }, + "peerDependencies": { + "hardhat": "^2.11.0" + } + }, + "node_modules/solidity-coverage/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/solidity-coverage/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/solidity-coverage/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/solidity-coverage/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/solidity-coverage/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/solidity-coverage/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/solidity-coverage/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true + }, + "node_modules/stacktrace-parser": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.11.tgz", + "integrity": "sha512-WjlahMgHmCJpqzU8bIBy4qtsZdU9lRlcZE3Lvyej6t4tuOuv1vk57OW3MBrj6hXBFx/nNoC9MPMTcr5YA7NQbg==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/stacktrace-parser/node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "license": "WTFPL OR MIT", + "peer": true + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strnum": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table": { + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.9.0.tgz", + "integrity": "sha512-9kY+CygyYM6j02t5YFHbNz2FN5QmYGv9zAjVp4lCDjlCw7amdckXlEt/bjMhUIfj4ThGRE4gCUH5+yGnNuPo5A==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.4.4", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-buffer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", + "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/to-buffer/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/ts-command-line-args": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz", + "integrity": "sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" + }, + "bin": { + "write-markdown": "dist/write-markdown.js" + } + }, + "node_modules/ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "dev": true, + "license": "MIT", + "peer": true, + "peerDependencies": { + "typescript": ">=3.7.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", + "dev": true, + "license": "MIT" + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typechain": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.3.2.tgz", + "integrity": "sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" + } + }, + "node_modules/typechain/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/typechain/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typechain/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "license": "MIT", + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/typechain/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/typechain/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typechain/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undici": { + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@fastify/busboy": "^2.0.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/unfetch": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", + "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/viem": { + "version": "2.33.3", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.33.3.tgz", + "integrity": "sha512-aWDr6i6r3OfNCs0h9IieHFhn7xQJJ8YsuA49+9T5JRyGGAkWhLgcbLq2YMecgwM7HdUZpx1vPugZjsShqNi7Gw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/wevm" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.9.2", + "@noble/hashes": "1.8.0", + "@scure/bip32": "1.7.0", + "@scure/bip39": "1.6.0", + "abitype": "1.0.8", + "isows": "1.0.7", + "ox": "0.8.6", + "ws": "8.18.2" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/viem/node_modules/@noble/curves": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.2.tgz", + "integrity": "sha512-HxngEd2XUcg9xi20JkwlLCtYwfoFw4JGkuZpT+WlsPD4gB/cxkvTD8fSsoAnphGZhFdZYKeQIPCuFlWPm1uE0g==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/ws": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "license": "LGPL-3.0", + "peer": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-utils/node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "dev": true, + "license": "MPL-2.0", + "peer": true, + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/web3-utils/node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "dev": true, + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/web3-utils/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-utils/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.19", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", + "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/packages/core/confidential/src/environments/hardhat/upgradeable/package.json b/packages/core/confidential/src/environments/hardhat/upgradeable/package.json new file mode 100644 index 000000000..4da184ef9 --- /dev/null +++ b/packages/core/confidential/src/environments/hardhat/upgradeable/package.json @@ -0,0 +1,18 @@ +{ + "name": "hardhat-sample", + "version": "0.0.1", + "description": "", + "main": "index.js", + "scripts": { + "test": "hardhat test" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@openzeppelin/contracts": "^5.4.0", + "@openzeppelin/contracts-upgradeable": "^5.4.0", + "@openzeppelin/hardhat-upgrades": "^3.0.0", + "@nomicfoundation/hardhat-toolbox": "^6.1.0", + "hardhat": "^2.16.1" + } +} diff --git a/packages/core/confidential/src/erc1155.test.ts b/packages/core/confidential/src/erc1155.test.ts new file mode 100644 index 000000000..5c818868b --- /dev/null +++ b/packages/core/confidential/src/erc1155.test.ts @@ -0,0 +1,137 @@ +import test from 'ava'; +import { erc1155 } from '.'; + +import type { ERC1155Options } from './erc1155'; +import { buildERC1155 } from './erc1155'; +import { printContract } from './print'; + +function testERC1155(title: string, opts: Partial) { + test(title, t => { + const c = buildERC1155({ + name: 'MyToken', + uri: 'https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/', + ...opts, + }); + t.snapshot(printContract(c)); + }); +} + +/** + * Tests external API for equivalence with internal API + */ +function testAPIEquivalence(title: string, opts?: ERC1155Options) { + test(title, t => { + t.is( + erc1155.print(opts), + printContract( + buildERC1155({ + name: 'MyToken', + uri: '', + ...opts, + }), + ), + ); + }); +} + +testERC1155('basic', {}); + +testERC1155('name is unicodeSafe', { name: 'MyTokeć' }); + +testERC1155('basic + roles', { + access: 'roles', +}); + +testERC1155('basic + managed', { + access: 'managed', +}); + +testERC1155('no updatable uri', { + updatableUri: false, +}); + +testERC1155('burnable', { + burnable: true, +}); + +testERC1155('pausable', { + pausable: true, +}); + +testERC1155('mintable', { + mintable: true, +}); + +testERC1155('mintable + roles', { + mintable: true, + access: 'roles', +}); + +testERC1155('mintable + managed', { + mintable: true, + access: 'managed', +}); + +testERC1155('supply tracking', { + supply: true, +}); + +testERC1155('full upgradeable transparent', { + mintable: true, + access: 'roles', + burnable: true, + pausable: true, + upgradeable: 'transparent', +}); + +testERC1155('full upgradeable uups', { + mintable: true, + access: 'roles', + burnable: true, + pausable: true, + upgradeable: 'uups', +}); + +testERC1155('full upgradeable transparent with managed', { + mintable: true, + access: 'managed', + burnable: true, + pausable: true, + upgradeable: 'uups', +}); + +testAPIEquivalence('API default'); + +testAPIEquivalence('API basic', { + name: 'CustomToken', + uri: 'https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/', +}); + +testAPIEquivalence('API full upgradeable', { + name: 'CustomToken', + uri: 'https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/', + mintable: true, + access: 'roles', + burnable: true, + pausable: true, + upgradeable: 'uups', +}); + +test('API assert defaults', async t => { + t.is(erc1155.print(erc1155.defaults), erc1155.print()); +}); + +test('API isAccessControlRequired', async t => { + t.is(erc1155.isAccessControlRequired({ updatableUri: false, mintable: true }), true); + t.is(erc1155.isAccessControlRequired({ updatableUri: false, pausable: true }), true); + t.is( + erc1155.isAccessControlRequired({ + updatableUri: false, + upgradeable: 'uups', + }), + true, + ); + t.is(erc1155.isAccessControlRequired({ updatableUri: true }), true); + t.is(erc1155.isAccessControlRequired({ updatableUri: false }), false); + t.is(erc1155.isAccessControlRequired({}), true); // updatableUri is true by default +}); diff --git a/packages/core/confidential/src/erc1155.test.ts.md b/packages/core/confidential/src/erc1155.test.ts.md new file mode 100644 index 000000000..5b7de2840 --- /dev/null +++ b/packages/core/confidential/src/erc1155.test.ts.md @@ -0,0 +1,601 @@ +# Snapshot report for `src/erc1155.test.ts` + +The actual snapshot is saved in `erc1155.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## basic + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC1155, Ownable {␊ + constructor(address initialOwner)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + }␊ + ` + +## name is unicodeSafe + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyTokec is ERC1155, Ownable {␊ + constructor(address initialOwner)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + }␊ + ` + +## basic + roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + ␊ + contract MyToken is ERC1155, AccessControl {␊ + bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ + ␊ + constructor(address defaultAdmin)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + }␊ + ␊ + function setURI(string memory newuri) public onlyRole(URI_SETTER_ROLE) {␊ + _setURI(newuri);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC1155, AccessControl)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## basic + managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + ␊ + contract MyToken is ERC1155, AccessManaged {␊ + constructor(address initialAuthority)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + AccessManaged(initialAuthority)␊ + {}␊ + ␊ + function setURI(string memory newuri) public restricted {␊ + _setURI(newuri);␊ + }␊ + }␊ + ` + +## no updatable uri + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + ␊ + contract MyToken is ERC1155 {␊ + constructor()␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + {}␊ + }␊ + ` + +## burnable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {ERC1155Burnable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC1155, Ownable, ERC1155Burnable {␊ + constructor(address initialOwner)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + }␊ + ` + +## pausable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {ERC1155Pausable} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC1155, Ownable, ERC1155Pausable {␊ + constructor(address initialOwner)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256[] memory ids, uint256[] memory values)␊ + internal␊ + override(ERC1155, ERC1155Pausable)␊ + {␊ + super._update(from, to, ids, values);␊ + }␊ + }␊ + ` + +## mintable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC1155, Ownable {␊ + constructor(address initialOwner)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + ␊ + function mint(address account, uint256 id, uint256 amount, bytes memory data)␊ + public␊ + onlyOwner␊ + {␊ + _mint(account, id, amount, data);␊ + }␊ + ␊ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)␊ + public␊ + onlyOwner␊ + {␊ + _mintBatch(to, ids, amounts, data);␊ + }␊ + }␊ + ` + +## mintable + roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + ␊ + contract MyToken is ERC1155, AccessControl {␊ + bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + constructor(address defaultAdmin, address minter)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function setURI(string memory newuri) public onlyRole(URI_SETTER_ROLE) {␊ + _setURI(newuri);␊ + }␊ + ␊ + function mint(address account, uint256 id, uint256 amount, bytes memory data)␊ + public␊ + onlyRole(MINTER_ROLE)␊ + {␊ + _mint(account, id, amount, data);␊ + }␊ + ␊ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)␊ + public␊ + onlyRole(MINTER_ROLE)␊ + {␊ + _mintBatch(to, ids, amounts, data);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC1155, AccessControl)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## mintable + managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + ␊ + contract MyToken is ERC1155, AccessManaged {␊ + constructor(address initialAuthority)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + AccessManaged(initialAuthority)␊ + {}␊ + ␊ + function setURI(string memory newuri) public restricted {␊ + _setURI(newuri);␊ + }␊ + ␊ + function mint(address account, uint256 id, uint256 amount, bytes memory data)␊ + public␊ + restricted␊ + {␊ + _mint(account, id, amount, data);␊ + }␊ + ␊ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)␊ + public␊ + restricted␊ + {␊ + _mintBatch(to, ids, amounts, data);␊ + }␊ + }␊ + ` + +## supply tracking + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {ERC1155Supply} from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC1155, Ownable, ERC1155Supply {␊ + constructor(address initialOwner)␊ + ERC1155("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256[] memory ids, uint256[] memory values)␊ + internal␊ + override(ERC1155, ERC1155Supply)␊ + {␊ + super._update(from, to, ids, values);␊ + }␊ + }␊ + ` + +## full upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ + import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyToken is Initializable, ERC1155Upgradeable, AccessControlUpgradeable, ERC1155PausableUpgradeable, ERC1155BurnableUpgradeable {␊ + bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address defaultAdmin, address pauser, address minter)␊ + public initializer␊ + {␊ + __ERC1155_init("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/");␊ + __AccessControl_init();␊ + __ERC1155Pausable_init();␊ + __ERC1155Burnable_init();␊ + ␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function setURI(string memory newuri) public onlyRole(URI_SETTER_ROLE) {␊ + _setURI(newuri);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address account, uint256 id, uint256 amount, bytes memory data)␊ + public␊ + onlyRole(MINTER_ROLE)␊ + {␊ + _mint(account, id, amount, data);␊ + }␊ + ␊ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)␊ + public␊ + onlyRole(MINTER_ROLE)␊ + {␊ + _mintBatch(to, ids, amounts, data);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256[] memory ids, uint256[] memory values)␊ + internal␊ + override(ERC1155Upgradeable, ERC1155PausableUpgradeable)␊ + {␊ + super._update(from, to, ids, values);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC1155Upgradeable, AccessControlUpgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## full upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ + import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC1155Upgradeable, AccessControlUpgradeable, ERC1155PausableUpgradeable, ERC1155BurnableUpgradeable, UUPSUpgradeable {␊ + bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE");␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address defaultAdmin, address pauser, address minter, address upgrader)␊ + public initializer␊ + {␊ + __ERC1155_init("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/");␊ + __AccessControl_init();␊ + __ERC1155Pausable_init();␊ + __ERC1155Burnable_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + _grantRole(UPGRADER_ROLE, upgrader);␊ + }␊ + ␊ + function setURI(string memory newuri) public onlyRole(URI_SETTER_ROLE) {␊ + _setURI(newuri);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address account, uint256 id, uint256 amount, bytes memory data)␊ + public␊ + onlyRole(MINTER_ROLE)␊ + {␊ + _mint(account, id, amount, data);␊ + }␊ + ␊ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)␊ + public␊ + onlyRole(MINTER_ROLE)␊ + {␊ + _mintBatch(to, ids, amounts, data);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyRole(UPGRADER_ROLE)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256[] memory ids, uint256[] memory values)␊ + internal␊ + override(ERC1155Upgradeable, ERC1155PausableUpgradeable)␊ + {␊ + super._update(from, to, ids, values);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC1155Upgradeable, AccessControlUpgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## full upgradeable transparent with managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ + import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol";␊ + import {ERC1155PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155PausableUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC1155Upgradeable, AccessManagedUpgradeable, ERC1155PausableUpgradeable, ERC1155BurnableUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialAuthority) public initializer {␊ + __ERC1155_init("https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/");␊ + __AccessManaged_init(initialAuthority);␊ + __ERC1155Pausable_init();␊ + __ERC1155Burnable_init();␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function setURI(string memory newuri) public restricted {␊ + _setURI(newuri);␊ + }␊ + ␊ + function pause() public restricted {␊ + _pause();␊ + }␊ + ␊ + function unpause() public restricted {␊ + _unpause();␊ + }␊ + ␊ + function mint(address account, uint256 id, uint256 amount, bytes memory data)␊ + public␊ + restricted␊ + {␊ + _mint(account, id, amount, data);␊ + }␊ + ␊ + function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)␊ + public␊ + restricted␊ + {␊ + _mintBatch(to, ids, amounts, data);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + restricted␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256[] memory ids, uint256[] memory values)␊ + internal␊ + override(ERC1155Upgradeable, ERC1155PausableUpgradeable)␊ + {␊ + super._update(from, to, ids, values);␊ + }␊ + }␊ + ` diff --git a/packages/core/confidential/src/erc1155.test.ts.snap b/packages/core/confidential/src/erc1155.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..2809eaab0f3d8ab4bf97ae90655b179bb80cf196 GIT binary patch literal 1803 zcmV+m2lV(sRzVz;+~69t{mZbo6r>62&vAg7$uGI0hJ%xoPe3K97Z-@icu3l*UjK%IA~;NQMh6e!>qHyeq@8xs`I~oL>s#w9I4_@3WepKA}a4VO?nogMjXM5G1_4UoobI@i~11pcIj>xGa zPm*1ElAyJivd(I`<+mJ#QYGux4obH~A9zi#RRm;*;m0XTEP zSq=aIWJ=$)RpnyeL zrG_G5z0IZ1G`aGyd&0=hdVRB0uV^nfINV32!}Y$t|Loy5De>Np^2zqYPj|jPC`l{6 z5(iv94&m%PXMMK~A`46j;7By8u=bM?&{R*fs^?4)<{(<<4TX`U3F}Hr%zcmKprco4GmS46b+LZ@;E@X4ueEgsfzNud;6uvLA_bp zJuE-9pclgUTpnJGWCR81=kAuHJkyiF_dp34;+1 z@-6CKK8p;Run;T8!39ypJOOn*fd&ceASEH_;E*qPo<`8IpUR;PaZF!e8^om0z3KP_ zNBQV*R5C=DGA#Nt4oM-H`D8E`3Qi1}!?N&IT^$-cncBBL4^jKct!qK;iev9(sqM;1joL1NjM@q5t|#22H_8u}26vX0rD2tBv=8s{{$@n0~4{a`QXd1+=qx2o^bUQR1L)arLxjv0@Wc&d4zJ& z{M$~vU4S+)6Og6fQ5W|-8YUvy^DO@q@;pDJQGL&8nD37GSTL}wy8Krt8vK^t2}{;hz1CgT*?CJJ)k3<+ z;qWI*2dU{Y)IKmNe2hsaVgLUg+W)^Uc#Y>=tyyMYwzp(UNv*SFtIvwct3F1ZgN}~9 z)Klr_oV?dIR23L{hd~8d;a@OFxDJ`Qkz)?v?RP>B;NM)@Qf%G^VcsVE(M$TJd$+djM^90}qhILfxuz^9X{))_tNONPKImqJ2@`Pa}y zZ^s4DMKbfy$Y7gdXIp`>88!$irA94LPGDfFO$JGlz+>6qf@+WGsk=OU%^)1M(Hb;8 zaxhxO508UBUcuIL_0|Y6KIjAhdviuKH>@K7Hn`d0nD5Jr_1&7z(l*UGR}x4AosDLQ zeYVQbc!Yz4XShuCW=yZ?5@1uodB6+Rok=)6irTe$xwELD;*!s$vfk0P>K&z*M~)e? zE|Xu*s!cXlT%JMm%!p;thM^~%rriBGls>)kV6KCeM%b$75@MCYPB;@L8=jqOh*eYXyXO*`n tMzAY=fhUrqCJUM@&rOz*Vse|kNHmi)Hi|RLTql0_<3E{SB~2(u006e*X> = { + name: 'MyToken', + uri: '', + burnable: false, + pausable: false, + mintable: false, + supply: false, + updatableUri: true, + access: commonDefaults.access, + upgradeable: commonDefaults.upgradeable, + info: commonDefaults.info, +} as const; + +function withDefaults(opts: ERC1155Options): Required { + return { + ...opts, + ...withCommonDefaults(opts), + burnable: opts.burnable ?? defaults.burnable, + pausable: opts.pausable ?? defaults.pausable, + mintable: opts.mintable ?? defaults.mintable, + supply: opts.supply ?? defaults.supply, + updatableUri: opts.updatableUri ?? defaults.updatableUri, + }; +} + +export function printERC1155(opts: ERC1155Options = defaults): string { + return printContract(buildERC1155(opts)); +} + +export function isAccessControlRequired(opts: Partial): boolean { + return opts.mintable || opts.pausable || opts.updatableUri !== false || opts.upgradeable === 'uups'; +} + +export function buildERC1155(opts: ERC1155Options): Contract { + const allOpts = withDefaults(opts); + + const c = new ContractBuilder(allOpts.name); + + const { access, upgradeable, info } = allOpts; + + addBase(c, allOpts.uri); + + if (allOpts.updatableUri) { + addSetUri(c, access); + } + + if (allOpts.pausable) { + addPausableExtension(c, access); + } + + if (allOpts.burnable) { + addBurnable(c); + } + + if (allOpts.mintable) { + addMintable(c, access); + } + + if (allOpts.supply) { + addSupply(c); + } + + setAccessControl(c, access); + setUpgradeable(c, upgradeable, access); + setInfo(c, info); + + return c; +} + +function addBase(c: ContractBuilder, uri: string) { + const ERC1155 = { + name: 'ERC1155', + path: '@openzeppelin/contracts/token/ERC1155/ERC1155.sol', + }; + c.addParent(ERC1155, [uri]); + + c.addOverride(ERC1155, functions._update); + c.addOverride(ERC1155, supportsInterface); +} + +function addPausableExtension(c: ContractBuilder, access: Access) { + const ERC1155Pausable = { + name: 'ERC1155Pausable', + path: '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol', + }; + c.addParent(ERC1155Pausable); + c.addOverride(ERC1155Pausable, functions._update); + + addPauseFunctions(c, access); +} + +function addBurnable(c: ContractBuilder) { + c.addParent({ + name: 'ERC1155Burnable', + path: '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol', + }); +} + +function addMintable(c: ContractBuilder, access: Access) { + requireAccessControl(c, functions.mint, access, 'MINTER', 'minter'); + requireAccessControl(c, functions.mintBatch, access, 'MINTER', 'minter'); + c.addFunctionCode('_mint(account, id, amount, data);', functions.mint); + c.addFunctionCode('_mintBatch(to, ids, amounts, data);', functions.mintBatch); +} + +function addSetUri(c: ContractBuilder, access: Access) { + requireAccessControl(c, functions.setURI, access, 'URI_SETTER', undefined); + c.addFunctionCode('_setURI(newuri);', functions.setURI); +} + +function addSupply(c: ContractBuilder) { + const ERC1155Supply = { + name: 'ERC1155Supply', + path: '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol', + }; + c.addParent(ERC1155Supply); + c.addOverride(ERC1155Supply, functions._update); +} + +const functions = defineFunctions({ + _update: { + kind: 'internal' as const, + args: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'ids', type: 'uint256[] memory' }, + { name: 'values', type: 'uint256[] memory' }, + ], + }, + + setURI: { + kind: 'public' as const, + args: [{ name: 'newuri', type: 'string memory' }], + }, + + mint: { + kind: 'public' as const, + args: [ + { name: 'account', type: 'address' }, + { name: 'id', type: 'uint256' }, + { name: 'amount', type: 'uint256' }, + { name: 'data', type: 'bytes memory' }, + ], + }, + + mintBatch: { + kind: 'public' as const, + args: [ + { name: 'to', type: 'address' }, + { name: 'ids', type: 'uint256[] memory' }, + { name: 'amounts', type: 'uint256[] memory' }, + { name: 'data', type: 'bytes memory' }, + ], + }, +}); diff --git a/packages/core/confidential/src/erc20.test.ts b/packages/core/confidential/src/erc20.test.ts new file mode 100644 index 000000000..41b3d0763 --- /dev/null +++ b/packages/core/confidential/src/erc20.test.ts @@ -0,0 +1,314 @@ +import test from 'ava'; +import type { OptionsError } from '.'; +import { erc20 } from '.'; + +import type { ERC20Options } from './erc20'; +import { buildERC20 } from './erc20'; +import { printContract } from './print'; + +function testERC20(title: string, opts: Partial) { + test(title, t => { + const c = buildERC20({ + name: 'MyToken', + symbol: 'MTK', + ...opts, + }); + t.snapshot(printContract(c)); + }); +} + +/** + * Tests external API for equivalence with internal API + */ +function testAPIEquivalence(title: string, opts?: ERC20Options) { + test(title, t => { + t.is( + erc20.print(opts), + printContract( + buildERC20({ + name: 'MyToken', + symbol: 'MTK', + ...opts, + }), + ), + ); + }); +} + +testERC20('basic erc20', {}); + +testERC20('erc20 name is unicodeSafe', { name: 'MyTokeć' }); + +testERC20('erc20 burnable', { + burnable: true, +}); + +testERC20('erc20 pausable', { + pausable: true, + access: 'ownable', +}); + +testERC20('erc20 pausable with roles', { + pausable: true, + access: 'roles', +}); + +testERC20('erc20 pausable with managed', { + pausable: true, + access: 'managed', +}); + +testERC20('erc20 burnable pausable', { + burnable: true, + pausable: true, +}); + +testERC20('erc20 preminted', { + premint: '1000', +}); + +testERC20('erc20 premint of 0', { + premint: '0', +}); + +function testPremint(scenario: string, premint: string, expectedError?: string) { + test(`erc20 premint - ${scenario} - ${expectedError ? 'invalid' : 'valid'}`, async t => { + if (expectedError) { + const error = t.throws(() => + buildERC20({ + name: 'MyToken', + symbol: 'MTK', + premint, + }), + ); + t.is((error as OptionsError).messages.premint, expectedError); + } else { + const c = buildERC20({ + name: 'MyToken', + symbol: 'MTK', + premint, + }); + t.snapshot(printContract(c)); + } + }); +} + +testPremint('max literal', '115792089237316195423570985008687907853269984665640564039457.584007913129639935'); // 2^256 - 1, shifted by 18 decimals +testPremint( + 'max literal + 1', + '115792089237316195423570985008687907853269984665640564039457.584007913129639936', + 'Value is greater than uint256 max value', +); +testPremint('no arithmetic overflow', '115792089237316195423570985008687907853269984665640564039457'); // 2^256 - 1, truncated by 18 decimals +testPremint( + 'arithmetic overflow', + '115792089237316195423570985008687907853269984665640564039458', + 'Amount would overflow uint256 after applying decimals', +); +testPremint('e notation', '1e59'); +testPremint('e notation arithmetic overflow', '1e60', 'Amount would overflow uint256 after applying decimals'); + +testERC20('erc20 mintable', { + mintable: true, + access: 'ownable', +}); + +testERC20('erc20 mintable with roles', { + mintable: true, + access: 'roles', +}); + +testERC20('erc20 callback', { + callback: true, +}); + +testERC20('erc20 permit', { + permit: true, +}); + +testERC20('erc20 votes', { + votes: true, +}); + +testERC20('erc20 votes + blocknumber', { + votes: 'blocknumber', +}); + +testERC20('erc20 votes + timestamp', { + votes: 'timestamp', +}); + +testERC20('erc20 flashmint', { + flashmint: true, +}); + +testERC20('erc20 crossChainBridging custom', { + crossChainBridging: 'custom', +}); + +testERC20('erc20 crossChainBridging custom ownable', { + crossChainBridging: 'custom', + access: 'ownable', +}); + +testERC20('erc20 crossChainBridging custom ownable mintable burnable', { + crossChainBridging: 'custom', + access: 'ownable', + mintable: true, + burnable: true, +}); + +testERC20('erc20 crossChainBridging custom roles', { + crossChainBridging: 'custom', + access: 'roles', +}); + +testERC20('erc20 crossChainBridging custom managed', { + crossChainBridging: 'custom', + access: 'managed', +}); + +testERC20('erc20 crossChainBridging superchain', { + crossChainBridging: 'superchain', +}); + +testERC20('erc20 crossChainBridging superchain ownable', { + crossChainBridging: 'superchain', + access: 'ownable', +}); + +testERC20('erc20 crossChainBridging superchain roles', { + crossChainBridging: 'superchain', + access: 'roles', +}); + +testERC20('erc20 crossChainBridging superchain managed', { + crossChainBridging: 'superchain', + access: 'managed', +}); + +testERC20('erc20 crossChainBridging custom upgradeable', { + crossChainBridging: 'custom', + upgradeable: 'transparent', +}); + +testERC20('erc20 crossChainBridging superchain upgradeable', { + crossChainBridging: 'superchain', + upgradeable: 'transparent', +}); + +test('erc20 crossChainBridging superchain, premintChainId required', async t => { + const error = t.throws(() => + buildERC20({ + name: 'MyToken', + symbol: 'MTK', + crossChainBridging: 'superchain', + premint: '2000', + }), + ); + t.is( + (error as OptionsError).messages.premintChainId, + 'Chain ID is required when using Premint with Cross-Chain Bridging', + ); +}); + +testERC20('erc20 premint ignores chainId when not crossChainBridging', { + premint: '2000', + premintChainId: '10', +}); + +testERC20('erc20 premint chainId crossChainBridging custom', { + premint: '2000', + premintChainId: '10', + crossChainBridging: 'custom', +}); + +testERC20('erc20 premint chainId crossChainBridging superchain', { + premint: '2000', + premintChainId: '10', + crossChainBridging: 'superchain', +}); + +testERC20('erc20 full crossChainBridging custom upgradeable uups', { + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + callback: true, + permit: true, + votes: true, + flashmint: true, + crossChainBridging: 'custom', + premintChainId: '10', + upgradeable: 'uups', +}); + +testERC20('erc20 full upgradeable transparent', { + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + callback: true, + permit: true, + votes: true, + flashmint: true, + upgradeable: 'transparent', +}); + +testERC20('erc20 full upgradeable uups', { + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + callback: true, + permit: true, + votes: true, + flashmint: true, + upgradeable: 'uups', +}); + +testERC20('erc20 full upgradeable uups managed', { + premint: '2000', + access: 'managed', + burnable: true, + mintable: true, + pausable: true, + callback: true, + permit: true, + votes: true, + flashmint: true, + upgradeable: 'uups', +}); + +testAPIEquivalence('erc20 API default'); + +testAPIEquivalence('erc20 API basic', { name: 'CustomToken', symbol: 'CTK' }); + +testAPIEquivalence('erc20 API full upgradeable', { + name: 'CustomToken', + symbol: 'CTK', + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + callback: true, + permit: true, + votes: true, + flashmint: true, + upgradeable: 'uups', +}); + +test('erc20 API assert defaults', async t => { + t.is(erc20.print(erc20.defaults), erc20.print()); +}); + +test('erc20 API isAccessControlRequired', async t => { + t.is(erc20.isAccessControlRequired({ mintable: true }), true); + t.is(erc20.isAccessControlRequired({ pausable: true }), true); + t.is(erc20.isAccessControlRequired({ upgradeable: 'uups' }), true); + t.is(erc20.isAccessControlRequired({ upgradeable: 'transparent' }), false); +}); diff --git a/packages/core/confidential/src/erc20.test.ts.md b/packages/core/confidential/src/erc20.test.ts.md new file mode 100644 index 000000000..9c9af9619 --- /dev/null +++ b/packages/core/confidential/src/erc20.test.ts.md @@ -0,0 +1,1388 @@ +# Snapshot report for `src/erc20.test.ts` + +The actual snapshot is saved in `erc20.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## basic erc20 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + }␊ + ` + +## erc20 name is unicodeSafe + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyTokec is ERC20, ERC20Permit {␊ + constructor() ERC20(unicode"MyTokeć", "MTK") ERC20Permit(unicode"MyTokeć") {}␊ + }␊ + ` + +## erc20 burnable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Burnable, ERC20Permit {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + }␊ + ` + +## erc20 pausable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ + constructor(address initialOwner)␊ + ERC20("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + ERC20Permit("MyToken")␊ + {}␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## erc20 pausable with roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + ␊ + constructor(address defaultAdmin, address pauser)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## erc20 pausable with managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ + constructor(address initialAuthority)␊ + ERC20("MyToken", "MTK")␊ + AccessManaged(initialAuthority)␊ + ERC20Permit("MyToken")␊ + {}␊ + ␊ + function pause() public restricted {␊ + _pause();␊ + }␊ + ␊ + function unpause() public restricted {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## erc20 burnable pausable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ + constructor(address initialOwner)␊ + ERC20("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + ERC20Permit("MyToken")␊ + {}␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## erc20 preminted + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor(address recipient)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _mint(recipient, 1000 * 10 ** decimals());␊ + }␊ + }␊ + ` + +## erc20 premint of 0 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + }␊ + ` + +## erc20 premint - max literal - valid + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor(address recipient)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _mint(recipient, 115792089237316195423570985008687907853269984665640564039457584007913129639935 * 10 ** (decimals() - 18));␊ + }␊ + }␊ + ` + +## erc20 premint - no arithmetic overflow - valid + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor(address recipient)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _mint(recipient, 115792089237316195423570985008687907853269984665640564039457 * 10 ** decimals());␊ + }␊ + }␊ + ` + +## erc20 premint - e notation - valid + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor(address recipient)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _mint(recipient, 100000000000000000000000000000000000000000000000000000000000 * 10 ** decimals());␊ + }␊ + }␊ + ` + +## erc20 mintable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC20, Ownable, ERC20Permit {␊ + constructor(address initialOwner)␊ + ERC20("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + ERC20Permit("MyToken")␊ + {}␊ + ␊ + function mint(address to, uint256 amount) public onlyOwner {␊ + _mint(to, amount);␊ + }␊ + }␊ + ` + +## erc20 mintable with roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, AccessControl, ERC20Permit {␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + constructor(address defaultAdmin, address minter)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + }␊ + ` + +## erc20 callback + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC1363, ERC20Permit {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + }␊ + ` + +## erc20 permit + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + }␊ + ` + +## erc20 votes + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit, ERC20Votes {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## erc20 votes + blocknumber + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit, ERC20Votes {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## erc20 votes + timestamp + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit, ERC20Votes {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + ␊ + function clock() public view override returns (uint48) {␊ + return uint48(block.timestamp);␊ + }␊ + ␊ + // solhint-disable-next-line func-name-mixedcase␊ + function CLOCK_MODE() public pure override returns (string memory) {␊ + return "mode=timestamp";␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## erc20 flashmint + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit, ERC20FlashMint {␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + }␊ + ` + +## erc20 crossChainBridging custom + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + constructor(address tokenBridge_)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging custom ownable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit, Ownable {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + constructor(address tokenBridge_, address initialOwner)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + Ownable(initialOwner)␊ + {␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging custom ownable mintable burnable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Burnable, Ownable, ERC20Permit {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + constructor(address tokenBridge_, address initialOwner)␊ + ERC20("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + ERC20Permit("MyToken")␊ + {␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyOwner {␊ + _mint(to, amount);␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging custom roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, AccessControl, ERC20Permit {␊ + bytes32 public constant TOKEN_BRIDGE_ROLE = keccak256("TOKEN_BRIDGE_ROLE");␊ + error Unauthorized();␊ + ␊ + constructor(address defaultAdmin, address tokenBridge)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(TOKEN_BRIDGE_ROLE, tokenBridge);␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (!hasRole(TOKEN_BRIDGE_ROLE, caller)) revert Unauthorized();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC20Bridgeable, AccessControl)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging custom managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {AuthorityUtils} from "@openzeppelin/contracts/access/manager/AuthorityUtils.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, AccessManaged, ERC20Permit {␊ + error Unauthorized();␊ + ␊ + constructor(address initialAuthority)␊ + ERC20("MyToken", "MTK")␊ + AccessManaged(initialAuthority)␊ + ERC20Permit("MyToken")␊ + {}␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + (bool immediate,) = AuthorityUtils.canCallWithDelay(authority(), caller, address(this), bytes4(_msgData()[0:4]));␊ + if (!immediate) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging superchain + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ + address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;␊ + error Unauthorized();␊ + ␊ + constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}␊ + ␊ + /**␊ + * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.␊ + *␊ + * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.␊ + */␊ + function _checkTokenBridge(address caller) internal pure override {␊ + if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging superchain ownable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit, Ownable {␊ + address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;␊ + error Unauthorized();␊ + ␊ + constructor(address initialOwner)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + /**␊ + * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.␊ + *␊ + * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.␊ + */␊ + function _checkTokenBridge(address caller) internal pure override {␊ + if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging superchain roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit, AccessControl {␊ + address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;␊ + error Unauthorized();␊ + ␊ + constructor(address defaultAdmin)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + }␊ + ␊ + /**␊ + * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.␊ + *␊ + * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.␊ + */␊ + function _checkTokenBridge(address caller) internal pure override {␊ + if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC20Bridgeable, AccessControl)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging superchain managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit, AccessManaged {␊ + address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;␊ + error Unauthorized();␊ + ␊ + constructor(address initialAuthority)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + AccessManaged(initialAuthority)␊ + {}␊ + ␊ + /**␊ + * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.␊ + *␊ + * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.␊ + */␊ + function _checkTokenBridge(address caller) internal pure override {␊ + if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging custom upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20PermitUpgradeable {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address tokenBridge_) public initializer {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Permit_init("MyToken");␊ + ␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 crossChainBridging superchain upgradeable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20PermitUpgradeable {␊ + address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize() public initializer {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Permit_init("MyToken");␊ + }␊ + ␊ + /**␊ + * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.␊ + *␊ + * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.␊ + */␊ + function _checkTokenBridge(address caller) internal pure override {␊ + if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 premint ignores chainId when not crossChainBridging + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Permit {␊ + constructor(address recipient)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + }␊ + ` + +## erc20 premint chainId crossChainBridging custom + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + constructor(address tokenBridge_, address recipient)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 premint chainId crossChainBridging superchain + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Bridgeable, ERC20Permit {␊ + address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;␊ + error Unauthorized();␊ + ␊ + constructor(address recipient)␊ + ERC20("MyToken", "MTK")␊ + ERC20Permit("MyToken")␊ + {␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + }␊ + ␊ + /**␊ + * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.␊ + *␊ + * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.␊ + */␊ + function _checkTokenBridge(address caller) internal pure override {␊ + if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();␊ + }␊ + }␊ + ` + +## erc20 full crossChainBridging custom upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {ERC1363Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC1363Upgradeable.sol";␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, AccessControlUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, ERC1363Upgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ + bytes32 public constant TOKEN_BRIDGE_ROLE = keccak256("TOKEN_BRIDGE_ROLE");␊ + error Unauthorized();␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address defaultAdmin, address tokenBridge, address recipient, address pauser, address minter, address upgrader)␊ + public initializer␊ + {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Bridgeable_init();␊ + __AccessControl_init();␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __ERC1363_init();␊ + __ERC20Permit_init("MyToken");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(TOKEN_BRIDGE_ROLE, tokenBridge);␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + _grantRole(UPGRADER_ROLE, upgrader);␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (!hasRole(TOKEN_BRIDGE_ROLE, caller)) revert Unauthorized();␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyRole(UPGRADER_ROLE)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC20BridgeableUpgradeable, AccessControlUpgradeable, ERC1363Upgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## erc20 full upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {ERC1363Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC1363Upgradeable.sol";␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, AccessControlUpgradeable, ERC1363Upgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable {␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address recipient, address defaultAdmin, address pauser, address minter)␊ + public initializer␊ + {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __AccessControl_init();␊ + __ERC1363_init();␊ + __ERC20Permit_init("MyToken");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + ␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(AccessControlUpgradeable, ERC1363Upgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## erc20 full upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {ERC1363Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC1363Upgradeable.sol";␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, AccessControlUpgradeable, ERC1363Upgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address recipient, address defaultAdmin, address pauser, address minter, address upgrader)␊ + public initializer␊ + {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __AccessControl_init();␊ + __ERC1363_init();␊ + __ERC20Permit_init("MyToken");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + _grantRole(UPGRADER_ROLE, upgrader);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyRole(UPGRADER_ROLE)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(AccessControlUpgradeable, ERC1363Upgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## erc20 full upgradeable uups managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {ERC1363Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC1363Upgradeable.sol";␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, AccessManagedUpgradeable, ERC1363Upgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address recipient, address initialAuthority)␊ + public initializer␊ + {␊ + __ERC20_init("MyToken", "MTK");␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __AccessManaged_init(initialAuthority);␊ + __ERC1363_init();␊ + __ERC20Permit_init("MyToken");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + ␊ + function pause() public restricted {␊ + _pause();␊ + }␊ + ␊ + function unpause() public restricted {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public restricted {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + restricted␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` diff --git a/packages/core/confidential/src/erc20.test.ts.snap b/packages/core/confidential/src/erc20.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..fe5aa7f886c5e07b261f689582143ece4a961b75 GIT binary patch literal 3446 zcmV-+4TwG?Up$bBQv84tcRY_RO5m|38pQu_gZTI99>gbJJFhZ~zKlG0 zxv$Geo!+yN4zx_MjoiD#*~q`{PPL8fdhNW@D0(u+U?aZlo%2kV4HX5MX4Na5c{cId zQwH9Py$lYjDn+IVFu@E%ZReaIT5?L+e<{WoJohRoc6mEtvd-fdFK3*8TNY6mHi%=i zs8|9W>sZ4IFo<^PNb^*-|Bk#ekDPDf0xXh6L{N$oQmul6HUcd}(~NUWP6DYWfD{4a z3{i?zWCDslv@k^~IKBk?o{i7N6gjdwDr6|=S$mkv!2iUIGO#dV^~Mr7gPMiH?!ts2 zN}v{e;n!Ofjj-2`L1EMCAUfw)?pA77=2qf2H?ctQ!NPTJYG}w5;Kpw_-1x=43E;+> z;}6b@hL+KJxOYS@eiL!14-Db@PlP1LmkgN;b>HP2V1a~z-L=F0&Ap?&ou`{%6`UeP zfv5GxQn3(uP$)f`NrfX7wV%PWdZMzO+>Iyl^j zWk`(iFy@>m?A=(|ha9{dPXb=1h`CP}%#4Ng#iI+71WFQ^1)~ga8AOq8*DF~1-2N+v zO@Ey3sA6tn`@SJiq~H!lgbkb1*yC9Yq?f^btyTlGV7>-sXMu_otV7K#mXanxIgDcjkiyyfP(BTEpFhdk-pkhM+7C88wCO4F`cjQn`r-RQomYen3O0&MOyfD8s z-)t<_7aGg8=1QYhTUlCJZq}Ap8VmKMW^-k6X{oWaShN3IXf8IE8!L;o+H!M#VZPp6 zT4**G8Ua)kL#zN5Fux)|jElLr;SmEsidkDn%$|bJ5N&D3c^4Z5oDDvZHhA-FFw^98 zQHYxw0>og@S#nA9y6)yx8~iVmd3pP%cD-Vze&-|3lBl$#F*4mLBq<7qDy`Gn>RHmP}7c~a+=#f$^637!r-QCzkMD2%xlU>`L^aQMV&%2 zL^2H_l2doc&I~4;C4b9}*r!vT95I zeeS95DdQ@Ux>9z$9=r{lqYcE;j}es^ATdBY0U0}qBBR$1!kJaQ!ov!jR~u$*vSH@5Ol#R z8Yak5q+%cXs_6IvsR}d^ui*OAo%Q#Qws$r*LoGX21f)VO?es2k0(7Js^irT~K{r&i z8faOV+H8uO2#H?mM@xfd+m3z+80>#JDE!BCGuU_RhHhhWB{U3#uUN z7x|)wX|A^+CQm3-NfYQNG)~?Ku6v`8gjtdn?Z`vD!`koehZ4VQW+Gsh_gG) z>EV|sMB>nq=U|m9Er$FfrHz!+gRorCVmnrhXepS3VvB)Lf7}8^x3H~sq{Ylct`W@-#B0WO#13Xe04lo!eW09c2-C4_~Dvuu-(}%Z~(e)-b%0t z!J?TFEW*9z^h*cs{gQ)^pH4Sj9v^&6+4TmKfv50PLzmQ#9HZ6Xxg<9pt;U*4^W|QE zn37g=zs7;zoA+f}&2?Cd^#xP|XY?HGytn!6=*iyJ#=Dz>yq?5k-;w*oGjZNe)Dd%* z{F7*SnbUTpNcCnLnrTXSg0kS&P(z=l)v-<8+_D?cf(j}+7PaWM$o^tW9VEn)da5|_sGwFRR6>%H{Q|zw<(XoGXX!92t9m~J(rc=bgs)I$? z{^9QC-ulqZyY-1^a<@NBn&b>^WXz0)w>?J;x@R^Q8NgY;EuE>>aE$d3^fM*bEPSnWW4Yy0#9q;HBzUbFh9T=GSE$cMGnKHhaQRD3lsF5C9zxM+UJ)X

}I`?U;rT?=>|9NM^!%`d=lF{epKyCnLJ9sOiX zE>lb{(^@w@F86b8a`@yr#pUEAapg(E>)8BG5`#zRdaQ)A1n}gVIG-fn+l;U}Clsnk zO!Du)#sS~VBv!?a2_A-8_Hg@3q(MpCipc2>VMC~}7qa!x#r3-3>LC^!t9{FLWBk0| zN;}lJxb)7ia6-D_ELYHj*NAQj1WrCnwCC!{Gu3JpJa!%Aq4C^rq*<|u30tTF?R8cZ zX$7Is$U53P$P%;^Q8O(W1P5irxy62C!g5?X$dS__NA}Yss6UFA3p>?)BU!@j+L%1Q zlfVs5;Ryk@nq_6#9b`Y{K=x-6WF^Q>9mq~-wVMZ^&I>358G)JXTD!^L--u6$L6PY; zYfA;^ZDb#!WP-UOw>K{3^QiU|UF%rSdOf4RknpX?x0-&ACjN=DncvBTj;RVKjWg$e zRQ5ksKHwv`d!c}v<)nhuRWM(RPU{2srR$rykM^IaIs*VA6>k0|pmF`5j$@8TOr^Ll0!c zgo@zs21bqivzsG`8wo^rz3^oODu`rv`>nE3M9-3?pS&YMQj;;Qrd9M3x4~)mKq%QJWl-F_PasC>XBlOGp5N1TvAXV=9oc=u*g_W7mtHT#q>)5 z32~71w-I6mIZrKzhC2-hsPp}M>ErwLiP#tg{pI;cP&Yy6TY5)BIwJ0GVP&`gGyKBW zj5AqAQ8+aEb0)U5IY_ok_3U;t20QKR@X^ldeX1g;yy_;wy=-B)*dP zO5&RY#K{ofob$x=i`a6<{Jar$pC|Ob#!RpWsiMgK<#2@s_x*wXnUq+@km!?G_(VBV YsFI{fll|58aq@@%16opTS!uTb0EmyWy#N3J literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/erc20.ts b/packages/core/confidential/src/erc20.ts new file mode 100644 index 000000000..b78738a95 --- /dev/null +++ b/packages/core/confidential/src/erc20.ts @@ -0,0 +1,457 @@ +import { ContractBuilder } from './contract'; +import type { Access } from './set-access-control'; +import { setAccessControl, requireAccessControl } from './set-access-control'; +import { addPauseFunctions } from './add-pausable'; +import { defineFunctions } from './utils/define-functions'; +import type { CommonOptions } from './common-options'; +import { withCommonDefaults, defaults as commonDefaults } from './common-options'; +import { setUpgradeable } from './set-upgradeable'; +import { setInfo } from './set-info'; +import { printContract } from './print'; +import type { ClockMode } from './set-clock-mode'; +import { clockModeDefault, setClockMode } from './set-clock-mode'; +import { supportsInterface } from './common-functions'; +import { OptionsError } from './error'; +import { toUint256, UINT256_MAX } from './utils/convert-strings'; + +export const crossChainBridgingOptions = [false, 'custom', 'superchain'] as const; +export type CrossChainBridging = (typeof crossChainBridgingOptions)[number]; + +export interface ERC20Options extends CommonOptions { + name: string; + symbol: string; + burnable?: boolean; + pausable?: boolean; + premint?: string; + premintChainId?: string; + mintable?: boolean; + callback?: boolean; + permit?: boolean; + /** + * Whether to keep track of historical balances for voting in on-chain governance, and optionally specify the clock mode. + * Setting `true` is equivalent to 'blocknumber'. Setting a clock mode implies voting is enabled. + */ + votes?: boolean | ClockMode; + flashmint?: boolean; + crossChainBridging?: CrossChainBridging; +} + +export const defaults: Required = { + name: 'MyToken', + symbol: 'MTK', + burnable: false, + pausable: false, + premint: '0', + premintChainId: '', + mintable: false, + callback: false, + permit: true, + votes: false, + flashmint: false, + crossChainBridging: false, + access: commonDefaults.access, + upgradeable: commonDefaults.upgradeable, + info: commonDefaults.info, +} as const; + +export function withDefaults(opts: ERC20Options): Required { + return { + ...opts, + ...withCommonDefaults(opts), + burnable: opts.burnable ?? defaults.burnable, + pausable: opts.pausable ?? defaults.pausable, + premint: opts.premint || defaults.premint, + premintChainId: opts.premintChainId || defaults.premintChainId, + mintable: opts.mintable ?? defaults.mintable, + callback: opts.callback ?? defaults.callback, + permit: opts.permit ?? defaults.permit, + votes: opts.votes ?? defaults.votes, + flashmint: opts.flashmint ?? defaults.flashmint, + crossChainBridging: opts.crossChainBridging ?? defaults.crossChainBridging, + }; +} + +export function printERC20(opts: ERC20Options = defaults): string { + return printContract(buildERC20(opts)); +} + +export function isAccessControlRequired(opts: Partial): boolean { + return opts.mintable || opts.pausable || opts.upgradeable === 'uups'; +} + +export function buildERC20(opts: ERC20Options): ContractBuilder { + const allOpts = withDefaults(opts); + + const c = new ContractBuilder(allOpts.name); + + const { access, upgradeable, info } = allOpts; + + addBase(c, allOpts.name, allOpts.symbol); + + if (allOpts.crossChainBridging) { + addCrossChainBridging(c, allOpts.crossChainBridging, access); + } + + if (allOpts.premint) { + addPremint(c, allOpts.premint, allOpts.premintChainId, allOpts.crossChainBridging); + } + + if (allOpts.burnable) { + addBurnable(c); + } + + if (allOpts.pausable) { + addPausableExtension(c, access); + } + + if (allOpts.mintable) { + addMintable(c, access); + } + + if (allOpts.callback) { + addCallback(c); + } + + // Note: Votes requires Permit + if (allOpts.permit || allOpts.votes) { + addPermit(c, allOpts.name); + } + + if (allOpts.votes) { + const clockMode = allOpts.votes === true ? clockModeDefault : allOpts.votes; + addVotes(c, clockMode); + } + + if (allOpts.flashmint) { + addFlashMint(c); + } + + setAccessControl(c, access); + setUpgradeable(c, upgradeable, access); + setInfo(c, info); + + return c; +} + +function addBase(c: ContractBuilder, name: string, symbol: string) { + const ERC20 = { + name: 'ERC20', + path: '@openzeppelin/contracts/token/ERC20/ERC20.sol', + }; + c.addParent(ERC20, [name, symbol]); + + c.addOverride(ERC20, functions._update); + c.addOverride(ERC20, functions._approve); // allows override from stablecoin +} + +function addPausableExtension(c: ContractBuilder, access: Access) { + const ERC20Pausable = { + name: 'ERC20Pausable', + path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol', + }; + c.addParent(ERC20Pausable); + c.addOverride(ERC20Pausable, functions._update); + + addPauseFunctions(c, access); +} + +function addBurnable(c: ContractBuilder) { + c.addParent({ + name: 'ERC20Burnable', + path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol', + }); +} + +export const premintPattern = /^(\d*)(?:\.(\d+))?(?:e(\d+))?$/; + +export const chainIdPattern = /^(?!$)[1-9]\d*$/; + +export function isValidChainId(str: string): boolean { + return chainIdPattern.test(str); +} + +function scaleByPowerOfTen(base: bigint, exponent: number): bigint { + if (exponent < 0) { + return base / BigInt(10) ** BigInt(-exponent); + } else { + return base * BigInt(10) ** BigInt(exponent); + } +} + +function addPremint( + c: ContractBuilder, + amount: string, + premintChainId: string, + crossChainBridging: CrossChainBridging, +) { + const m = amount.match(premintPattern); + if (m) { + const integer = m[1]?.replace(/^0+/, '') ?? ''; + const decimals = m[2]?.replace(/0+$/, '') ?? ''; + const exponent = Number(m[3] ?? 0); + + if (Number(integer + decimals) > 0) { + const decimalPlace = decimals.length - exponent; + const zeroes = new Array(Math.max(0, -decimalPlace)).fill('0').join(''); + const units = integer + decimals + zeroes; + const exp = decimalPlace <= 0 ? 'decimals()' : `(decimals() - ${decimalPlace})`; + + const validatedBaseUnits = toUint256(units, 'premint'); + checkPotentialPremintOverflow(validatedBaseUnits, decimalPlace); + + c.addConstructorArgument({ type: 'address', name: 'recipient' }); + + const mintLine = `_mint(recipient, ${units} * 10 ** ${exp});`; + + if (crossChainBridging) { + if (premintChainId === '') { + throw new OptionsError({ + premintChainId: 'Chain ID is required when using Premint with Cross-Chain Bridging', + }); + } + + if (!isValidChainId(premintChainId)) { + throw new OptionsError({ + premintChainId: 'Not a valid chain ID', + }); + } + + c.addConstructorCode(`if (block.chainid == ${premintChainId}) {`); + c.addConstructorCode(` ${mintLine}`); + c.addConstructorCode(`}`); + } else { + c.addConstructorCode(mintLine); + } + } + } else { + throw new OptionsError({ + premint: 'Not a valid number', + }); + } +} + +/** + * Check for potential premint overflow assuming the user's contract has decimals() = 18 + * + * @param baseUnits The base units of the token, before applying power of 10 + * @param decimalPlace If positive, the number of assumed decimal places in the least significant digits of `validatedBaseUnits`. Ignored if <= 0. + * @throws OptionsError if the calculated value would overflow uint256 + */ +function checkPotentialPremintOverflow(baseUnits: bigint, decimalPlace: number) { + const assumedExp = decimalPlace <= 0 ? 18 : 18 - decimalPlace; + const calculatedValue = scaleByPowerOfTen(baseUnits, assumedExp); + + if (calculatedValue > UINT256_MAX) { + throw new OptionsError({ + premint: 'Amount would overflow uint256 after applying decimals', + }); + } +} + +function addMintable(c: ContractBuilder, access: Access) { + requireAccessControl(c, functions.mint, access, 'MINTER', 'minter'); + c.addFunctionCode('_mint(to, amount);', functions.mint); +} + +function addCallback(c: ContractBuilder) { + const ERC1363 = { + name: 'ERC1363', + path: '@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol', + }; + c.addParent(ERC1363); + c.addOverride(ERC1363, supportsInterface); +} + +function addPermit(c: ContractBuilder, name: string) { + const ERC20Permit = { + name: 'ERC20Permit', + path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol', + }; + c.addParent(ERC20Permit, [name]); + c.addOverride(ERC20Permit, functions.nonces); +} + +function addVotes(c: ContractBuilder, clockMode: ClockMode) { + if (!c.parents.some(p => p.contract.name === 'ERC20Permit')) { + throw new Error('Missing ERC20Permit requirement for ERC20Votes'); + } + + const ERC20Votes = { + name: 'ERC20Votes', + path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol', + }; + c.addParent(ERC20Votes); + c.addOverride(ERC20Votes, functions._update); + + c.addImportOnly({ + name: 'Nonces', + path: '@openzeppelin/contracts/utils/Nonces.sol', + }); + c.addOverride( + { + name: 'Nonces', + }, + functions.nonces, + ); + + setClockMode(c, ERC20Votes, clockMode); +} + +function addFlashMint(c: ContractBuilder) { + c.addParent({ + name: 'ERC20FlashMint', + path: '@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol', + }); +} + +function addCrossChainBridging(c: ContractBuilder, crossChainBridging: 'custom' | 'superchain', access: Access) { + const ERC20Bridgeable = { + name: 'ERC20Bridgeable', + path: `@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol`, + }; + + c.addParent(ERC20Bridgeable); + c.addOverride(ERC20Bridgeable, supportsInterface); + + c.addOverride(ERC20Bridgeable, functions._checkTokenBridge); + switch (crossChainBridging) { + case 'custom': + addCustomBridging(c, access); + break; + case 'superchain': + addSuperchainERC20(c); + break; + default: { + const _: never = crossChainBridging; + throw new Error('Unknown value for `crossChainBridging`'); + } + } + c.addVariable('error Unauthorized();'); +} + +function addCustomBridging(c: ContractBuilder, access: Access) { + switch (access) { + case false: + case 'ownable': { + const addedBridgeImmutable = c.addVariable(`address public tokenBridge;`); + if (addedBridgeImmutable) { + c.addConstructorArgument({ type: 'address', name: 'tokenBridge_' }); + c.addConstructorCode(`require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");`); + c.addConstructorCode(`tokenBridge = tokenBridge_;`); + } + c.setFunctionBody([`if (caller != tokenBridge) revert Unauthorized();`], functions._checkTokenBridge, 'view'); + break; + } + case 'roles': { + setAccessControl(c, access); + const roleOwner = 'tokenBridge'; + const roleId = 'TOKEN_BRIDGE_ROLE'; + const addedRoleConstant = c.addVariable(`bytes32 public constant ${roleId} = keccak256("${roleId}");`); + if (addedRoleConstant) { + c.addConstructorArgument({ type: 'address', name: roleOwner }); + c.addConstructorCode(`_grantRole(${roleId}, ${roleOwner});`); + } + c.setFunctionBody( + [`if (!hasRole(${roleId}, caller)) revert Unauthorized();`], + functions._checkTokenBridge, + 'view', + ); + break; + } + case 'managed': { + setAccessControl(c, access); + c.addImportOnly({ + name: 'AuthorityUtils', + path: `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`, + }); + c.setFunctionBody( + [ + `(bool immediate,) = AuthorityUtils.canCallWithDelay(authority(), caller, address(this), bytes4(_msgData()[0:4]));`, + `if (!immediate) revert Unauthorized();`, + ], + functions._checkTokenBridge, + 'view', + ); + break; + } + default: { + const _: never = access; + throw new Error('Unknown value for `access`'); + } + } +} + +function addSuperchainERC20(c: ContractBuilder) { + c.addVariable('address internal constant SUPERCHAIN_TOKEN_BRIDGE = 0x4200000000000000000000000000000000000028;'); + c.setFunctionBody( + ['if (caller != SUPERCHAIN_TOKEN_BRIDGE) revert Unauthorized();'], + functions._checkTokenBridge, + 'pure', + ); + c.setFunctionComments( + [ + '/**', + ' * @dev Checks if the caller is the predeployed SuperchainTokenBridge. Reverts otherwise.', + ' *', + ' * IMPORTANT: The predeployed SuperchainTokenBridge is only available on chains in the Superchain.', + ' */', + ], + functions._checkTokenBridge, + ); +} + +export const functions = defineFunctions({ + _update: { + kind: 'internal' as const, + args: [ + { name: 'from', type: 'address' }, + { name: 'to', type: 'address' }, + { name: 'value', type: 'uint256' }, + ], + }, + + _approve: { + kind: 'internal' as const, + args: [ + { name: 'owner', type: 'address' }, + { name: 'spender', type: 'address' }, + { name: 'value', type: 'uint256' }, + { name: 'emitEvent', type: 'bool' }, + ], + }, + + mint: { + kind: 'public' as const, + args: [ + { name: 'to', type: 'address' }, + { name: 'amount', type: 'uint256' }, + ], + }, + + pause: { + kind: 'public' as const, + args: [], + }, + + unpause: { + kind: 'public' as const, + args: [], + }, + + snapshot: { + kind: 'public' as const, + args: [], + }, + + nonces: { + kind: 'public' as const, + args: [{ name: 'owner', type: 'address' }], + returns: ['uint256'], + mutability: 'view' as const, + }, + + _checkTokenBridge: { + kind: 'internal' as const, + args: [{ name: 'caller', type: 'address' }], + }, +}); diff --git a/packages/core/confidential/src/erc721.test.ts b/packages/core/confidential/src/erc721.test.ts new file mode 100644 index 000000000..a63cc4b88 --- /dev/null +++ b/packages/core/confidential/src/erc721.test.ts @@ -0,0 +1,160 @@ +import test from 'ava'; +import { erc721 } from '.'; + +import type { ERC721Options } from './erc721'; +import { buildERC721 } from './erc721'; +import { printContract } from './print'; + +function testERC721(title: string, opts: Partial) { + test(title, t => { + const c = buildERC721({ + name: 'MyToken', + symbol: 'MTK', + ...opts, + }); + t.snapshot(printContract(c)); + }); +} + +/** + * Tests external API for equivalence with internal API + */ +function testAPIEquivalence(title: string, opts?: ERC721Options) { + test(title, t => { + t.is( + erc721.print(opts), + printContract( + buildERC721({ + name: 'MyToken', + symbol: 'MTK', + ...opts, + }), + ), + ); + }); +} + +testERC721('basic', {}); + +testERC721('name is unicodeSafe', { name: 'MyTokeć' }); + +testERC721('base uri', { + baseUri: 'https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/', +}); + +testERC721('enumerable', { + enumerable: true, +}); + +testERC721('uri storage', { + uriStorage: true, +}); + +testERC721('mintable + uri storage', { + mintable: true, + uriStorage: true, +}); + +testERC721('mintable + uri storage + incremental', { + mintable: true, + uriStorage: true, + incremental: true, +}); + +testERC721('burnable', { + burnable: true, +}); + +testERC721('burnable + uri storage', { + uriStorage: true, + burnable: true, +}); + +testERC721('pausable', { + pausable: true, +}); + +testERC721('mintable', { + mintable: true, +}); + +testERC721('mintable + roles', { + mintable: true, + access: 'roles', +}); + +testERC721('mintable + managed', { + mintable: true, + access: 'managed', +}); + +testERC721('mintable + incremental', { + mintable: true, + incremental: true, +}); + +testERC721('votes', { + votes: true, +}); + +testERC721('votes + blocknumber', { + votes: 'blocknumber', +}); + +testERC721('votes + timestamp', { + votes: 'timestamp', +}); + +testERC721('full upgradeable transparent', { + mintable: true, + enumerable: true, + pausable: true, + burnable: true, + votes: true, + upgradeable: 'transparent', +}); + +testERC721('full upgradeable uups', { + mintable: true, + enumerable: true, + pausable: true, + burnable: true, + votes: true, + upgradeable: 'uups', +}); + +testERC721('full upgradeable uups + managed', { + mintable: true, + enumerable: true, + pausable: true, + burnable: true, + votes: true, + upgradeable: 'uups', + access: 'managed', +}); + +testAPIEquivalence('API default'); + +testAPIEquivalence('API basic', { name: 'CustomToken', symbol: 'CTK' }); + +testAPIEquivalence('API full upgradeable', { + name: 'CustomToken', + symbol: 'CTK', + mintable: true, + enumerable: true, + pausable: true, + burnable: true, + votes: true, + upgradeable: 'uups', +}); + +test('API assert defaults', async t => { + t.is(erc721.print(erc721.defaults), erc721.print()); +}); + +test('API isAccessControlRequired', async t => { + t.is(erc721.isAccessControlRequired({ mintable: true }), true); + t.is(erc721.isAccessControlRequired({ pausable: true }), true); + t.is(erc721.isAccessControlRequired({ upgradeable: 'uups' }), true); + t.is(erc721.isAccessControlRequired({ upgradeable: 'transparent' }), false); +}); diff --git a/packages/core/confidential/src/erc721.test.ts.md b/packages/core/confidential/src/erc721.test.ts.md new file mode 100644 index 000000000..5cbc3f8d9 --- /dev/null +++ b/packages/core/confidential/src/erc721.test.ts.md @@ -0,0 +1,779 @@ +# Snapshot report for `src/erc721.test.ts` + +The actual snapshot is saved in `erc721.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## basic + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + ␊ + contract MyToken is ERC721 {␊ + constructor() ERC721("MyToken", "MTK") {}␊ + }␊ + ` + +## name is unicodeSafe + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + ␊ + contract MyTokec is ERC721 {␊ + constructor() ERC721(unicode"MyTokeć", "MTK") {}␊ + }␊ + ` + +## base uri + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + ␊ + contract MyToken is ERC721 {␊ + constructor() ERC721("MyToken", "MTK") {}␊ + ␊ + function _baseURI() internal pure override returns (string memory) {␊ + return "https://gateway.pinata.cloud/ipfs/QmcP9hxrnC1T5ATPmq2saFeAM1ypFX9BnAswCdHB9JCjLA/";␊ + }␊ + }␊ + ` + +## enumerable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";␊ + ␊ + contract MyToken is ERC721, ERC721Enumerable {␊ + constructor() ERC721("MyToken", "MTK") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721, ERC721Enumerable)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + ␊ + function _increaseBalance(address account, uint128 value)␊ + internal␊ + override(ERC721, ERC721Enumerable)␊ + {␊ + super._increaseBalance(account, value);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721, ERC721Enumerable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## uri storage + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + ␊ + contract MyToken is ERC721, ERC721URIStorage {␊ + constructor() ERC721("MyToken", "MTK") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function tokenURI(uint256 tokenId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (string memory)␊ + {␊ + return super.tokenURI(tokenId);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## mintable + uri storage + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC721, ERC721URIStorage, Ownable {␊ + constructor(address initialOwner)␊ + ERC721("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function safeMint(address to, uint256 tokenId, string memory uri)␊ + public␊ + onlyOwner␊ + {␊ + _safeMint(to, tokenId);␊ + _setTokenURI(tokenId, uri);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function tokenURI(uint256 tokenId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (string memory)␊ + {␊ + return super.tokenURI(tokenId);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## mintable + uri storage + incremental + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC721, ERC721URIStorage, Ownable {␊ + uint256 private _nextTokenId;␊ + ␊ + constructor(address initialOwner)␊ + ERC721("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function safeMint(address to, string memory uri)␊ + public␊ + onlyOwner␊ + returns (uint256)␊ + {␊ + uint256 tokenId = _nextTokenId++;␊ + _safeMint(to, tokenId);␊ + _setTokenURI(tokenId, uri);␊ + return tokenId;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function tokenURI(uint256 tokenId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (string memory)␊ + {␊ + return super.tokenURI(tokenId);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## burnable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ + ␊ + contract MyToken is ERC721, ERC721Burnable {␊ + constructor() ERC721("MyToken", "MTK") {}␊ + }␊ + ` + +## burnable + uri storage + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";␊ + import {ERC721URIStorage} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";␊ + ␊ + contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable {␊ + constructor() ERC721("MyToken", "MTK") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function tokenURI(uint256 tokenId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (string memory)␊ + {␊ + return super.tokenURI(tokenId);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721, ERC721URIStorage)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## pausable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Pausable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC721, ERC721Pausable, Ownable {␊ + constructor(address initialOwner)␊ + ERC721("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721, ERC721Pausable)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + }␊ + ` + +## mintable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC721, Ownable {␊ + constructor(address initialOwner)␊ + ERC721("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function safeMint(address to, uint256 tokenId) public onlyOwner {␊ + _safeMint(to, tokenId);␊ + }␊ + }␊ + ` + +## mintable + roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + ␊ + contract MyToken is ERC721, AccessControl {␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + constructor(address defaultAdmin, address minter) ERC721("MyToken", "MTK") {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function safeMint(address to, uint256 tokenId) public onlyRole(MINTER_ROLE) {␊ + _safeMint(to, tokenId);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721, AccessControl)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## mintable + managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + ␊ + contract MyToken is ERC721, AccessManaged {␊ + constructor(address initialAuthority)␊ + ERC721("MyToken", "MTK")␊ + AccessManaged(initialAuthority)␊ + {}␊ + ␊ + function safeMint(address to, uint256 tokenId) public restricted {␊ + _safeMint(to, tokenId);␊ + }␊ + }␊ + ` + +## mintable + incremental + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC721, Ownable {␊ + uint256 private _nextTokenId;␊ + ␊ + constructor(address initialOwner)␊ + ERC721("MyToken", "MTK")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function safeMint(address to) public onlyOwner returns (uint256) {␊ + uint256 tokenId = _nextTokenId++;␊ + _safeMint(to, tokenId);␊ + return tokenId;␊ + }␊ + }␊ + ` + +## votes + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ + ␊ + contract MyToken is ERC721, EIP712, ERC721Votes {␊ + constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721, ERC721Votes)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + ␊ + function _increaseBalance(address account, uint128 value)␊ + internal␊ + override(ERC721, ERC721Votes)␊ + {␊ + super._increaseBalance(account, value);␊ + }␊ + }␊ + ` + +## votes + blocknumber + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ + ␊ + contract MyToken is ERC721, EIP712, ERC721Votes {␊ + constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721, ERC721Votes)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + ␊ + function _increaseBalance(address account, uint128 value)␊ + internal␊ + override(ERC721, ERC721Votes)␊ + {␊ + super._increaseBalance(account, value);␊ + }␊ + }␊ + ` + +## votes + timestamp + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol";␊ + import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";␊ + import {ERC721Votes} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol";␊ + ␊ + contract MyToken is ERC721, EIP712, ERC721Votes {␊ + constructor() ERC721("MyToken", "MTK") EIP712("MyToken", "1") {}␊ + ␊ + function clock() public view override returns (uint48) {␊ + return uint48(block.timestamp);␊ + }␊ + ␊ + // solhint-disable-next-line func-name-mixedcase␊ + function CLOCK_MODE() public pure override returns (string memory) {␊ + return "mode=timestamp";␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721, ERC721Votes)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + ␊ + function _increaseBalance(address account, uint128 value)␊ + internal␊ + override(ERC721, ERC721Votes)␊ + {␊ + super._increaseBalance(account, value);␊ + }␊ + }␊ + ` + +## full upgradeable transparent + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ + import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialOwner) public initializer {␊ + __ERC721_init("MyToken", "MTK");␊ + __ERC721Enumerable_init();␊ + __ERC721Pausable_init();␊ + __Ownable_init(initialOwner);␊ + __ERC721Burnable_init();␊ + __EIP712_init("MyToken", "1");␊ + __ERC721Votes_init();␊ + }␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + function safeMint(address to, uint256 tokenId) public onlyOwner {␊ + _safeMint(to, tokenId);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, ERC721VotesUpgradeable)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + ␊ + function _increaseBalance(address account, uint128 value)␊ + internal␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721VotesUpgradeable)␊ + {␊ + super._increaseBalance(account, value);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## full upgradeable uups + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ + import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialOwner) public initializer {␊ + __ERC721_init("MyToken", "MTK");␊ + __ERC721Enumerable_init();␊ + __ERC721Pausable_init();␊ + __Ownable_init(initialOwner);␊ + __ERC721Burnable_init();␊ + __EIP712_init("MyToken", "1");␊ + __ERC721Votes_init();␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + function safeMint(address to, uint256 tokenId) public onlyOwner {␊ + _safeMint(to, tokenId);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, ERC721VotesUpgradeable)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + ␊ + function _increaseBalance(address account, uint128 value)␊ + internal␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721VotesUpgradeable)␊ + {␊ + super._increaseBalance(account, value);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` + +## full upgradeable uups + managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol";␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {ERC721BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol";␊ + import {ERC721EnumerableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";␊ + import {ERC721PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol";␊ + import {ERC721VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, AccessManagedUpgradeable, ERC721BurnableUpgradeable, EIP712Upgradeable, ERC721VotesUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialAuthority) public initializer {␊ + __ERC721_init("MyToken", "MTK");␊ + __ERC721Enumerable_init();␊ + __ERC721Pausable_init();␊ + __AccessManaged_init(initialAuthority);␊ + __ERC721Burnable_init();␊ + __EIP712_init("MyToken", "1");␊ + __ERC721Votes_init();␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function pause() public restricted {␊ + _pause();␊ + }␊ + ␊ + function unpause() public restricted {␊ + _unpause();␊ + }␊ + ␊ + function safeMint(address to, uint256 tokenId) public restricted {␊ + _safeMint(to, tokenId);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + restricted␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address to, uint256 tokenId, address auth)␊ + internal␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721PausableUpgradeable, ERC721VotesUpgradeable)␊ + returns (address)␊ + {␊ + return super._update(to, tokenId, auth);␊ + }␊ + ␊ + function _increaseBalance(address account, uint128 value)␊ + internal␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721VotesUpgradeable)␊ + {␊ + super._increaseBalance(account, value);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC721Upgradeable, ERC721EnumerableUpgradeable)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + }␊ + ` diff --git a/packages/core/confidential/src/erc721.test.ts.snap b/packages/core/confidential/src/erc721.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..a2ed828abf8f15fc02f6192746c94ce9ce19f4ab GIT binary patch literal 2208 zcmV;R2w(R>RzVk@?;nc@00000000B+Tg`7Hw-sNncacWvp#^&AAwUSB2MLxmvAdi7Fcyf`>qXR9 zv1`jk(nADlhO!vXkh3Jmwsx_HqKEzi0eUEUNDny#1$xRQhnxZw0n%$P{YTncF&~^6 z&QP)}S+?YiFN+n)_r>>neD9I-MZafL^O%4BHzcsI5$ZvXP0R^&`G5-khc7G(3i!#& z&sJ}}am)W(xqIv9w^vpS103u<`?$V?O++}Vw=6^i?qkFrgLbP^G7PXq9Ty7Rvk^GO zVgPnsM1GH47ulGAElLD~rr_Yy`;B{zcS|mVM-Bv>+StNk2tIwc@vyP+V6#-hj!T&U zueSHM9&D_?27N{yP=24fh`fx*8Kxv>2zrc&5zdYNX>e+nH%lcs3ABeDe-^+Tgfqaa z5&!_0lyJd3Q&3i^MnjcyG`m~_<#y-8auvLKU3y)L48{p`kWa`X*rXOZfPJJf-!B#O zy?GPNXHI6m$S#o;zx$KkjDsHJ2zU%@Z1yrQ{Qo<&v5`#{>1@9FFeeU1$skp5Lvd7byLr^pgJbrYxW4faoIu+{vul*d9SNKhKr#*)>c!@s>$@m#`BLS`Pmj6S`N@R7to{i1;zb6=-&a@FdO6{?`kQXm4S1zC&dkh0ED1%3uh_Y%b z5v8-b^bzH7zjY95J6l9a=u93_k~IquQ3Cb+gD(?CW^&y`LyhaI=jS*dj%AZFT@w<= zs&m;$JaI4)!Ev(&#)9(BmkKEVy!^-f+(0SW?4FWIk_c#;h;t*FJq@sHAX=QUG1VwVNE*&VHp2Y+wxp`Im!;fObC2-Tj3U=I-7t!ra1!If*rw;S(qj z=n`}mBEMyAmKH4%P8;|Xm_#aPk&=lz;E7_3wYAMl3!W)l3Tf#gsQyTT>Y(Q_qVEE& z{85RUVj25=DxIg1uCql=NoDeQCs$10-9C}qbY4!s`fp{^{<-{x_FOh?5o`IGy`>1( zH$Pmv(Bt}Wz511c{J$(e^7kTLX9K0Aav^<7i8Q?BLfMa>oLvf<%CJ>!Z&0 zes_O&XB#{L$H+9{@y7l4D&^EbxjLptVWB?sY|*qFOp*}g1W{>RUY9t^5rahRQyW#D zZ9i`w?sU4%XYJNU0qdGVKVAJNt5TBIB;yfD(?y*+OTRj?gJ1p;F~^KgahNMe_gD(_ z4kYjhS(>9_U4ec1_O-#j9f~+1>_df^p{%`n_(zP-KSY|I7*K}A@B#;k!lI%lG~1EF zkY6&HBG%vnXG;2}aBK_xHc?!xdmS#eWZB3vb+R@2Nv=ITm)5kt?Hv0jI-x?F==@!A z$G=`nsoUCnu)cAg7kL8P+%VbD74(QfcQ7=#r!vHh;X1192kw*w{oom zPVE6EqHf`!Z(H}1(YlQZ3IwV99|qMOe1Q&J!Z}*kUeXXvvSgHJytX8sei*v$;r+rJP~k z3L7B!?0PmX~7u0!7UrIypx<~xJP#yY*VLIi|q#&uDW^}yA)YSs0J^V!d4Zen8iaEWG$G{0s-v^uj?cZHcTP1 zP)`P~>UMRha6EwbP7Ry;i1JD8G1T9FKyo0VeMKt{bH=gv-9_?$Z&&Fo{5m1mMh7(SPIDS;Am zCFr!}xOVtz#h*Jt!kGM^eu`Yw0!1xQ)B;m|mi>;l7#R0r@uzPnWx;>1qbyKf=FOJR zXdg0;$q|c!q$o&=g5+`vlABa2jEWyWx`H8jAiYpUgR(zL>5vG#RON&I?fAv&2R)6; iEFh+M;eI6*L?TyFLKG!LQ9?{nLi`_Tys?7zS^xl-WjZ?m literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/erc721.ts b/packages/core/confidential/src/erc721.ts new file mode 100644 index 000000000..2b945123f --- /dev/null +++ b/packages/core/confidential/src/erc721.ts @@ -0,0 +1,266 @@ +import type { BaseFunction, Contract } from './contract'; +import { ContractBuilder } from './contract'; +import type { Access } from './set-access-control'; +import { setAccessControl, requireAccessControl } from './set-access-control'; +import { addPauseFunctions } from './add-pausable'; +import { supportsInterface } from './common-functions'; +import { defineFunctions } from './utils/define-functions'; +import type { CommonOptions } from './common-options'; +import { withCommonDefaults, defaults as commonDefaults } from './common-options'; +import { setUpgradeable } from './set-upgradeable'; +import { setInfo } from './set-info'; +import { printContract } from './print'; +import type { ClockMode } from './set-clock-mode'; +import { clockModeDefault, setClockMode } from './set-clock-mode'; + +export interface ERC721Options extends CommonOptions { + name: string; + symbol: string; + baseUri?: string; + enumerable?: boolean; + uriStorage?: boolean; + burnable?: boolean; + pausable?: boolean; + mintable?: boolean; + incremental?: boolean; + /** + * Whether to keep track of individual units for voting in on-chain governance, and optionally specify the clock mode. + * Setting `true` is equivalent to 'blocknumber'. Setting a clock mode implies voting is enabled. + */ + votes?: boolean | ClockMode; +} + +export const defaults: Required = { + name: 'MyToken', + symbol: 'MTK', + baseUri: '', + enumerable: false, + uriStorage: false, + burnable: false, + pausable: false, + mintable: false, + incremental: false, + votes: false, + access: commonDefaults.access, + upgradeable: commonDefaults.upgradeable, + info: commonDefaults.info, +} as const; + +function withDefaults(opts: ERC721Options): Required { + return { + ...opts, + ...withCommonDefaults(opts), + baseUri: opts.baseUri ?? defaults.baseUri, + enumerable: opts.enumerable ?? defaults.enumerable, + uriStorage: opts.uriStorage ?? defaults.uriStorage, + burnable: opts.burnable ?? defaults.burnable, + pausable: opts.pausable ?? defaults.pausable, + mintable: opts.mintable ?? defaults.mintable, + incremental: opts.incremental ?? defaults.incremental, + votes: opts.votes ?? defaults.votes, + }; +} + +export function printERC721(opts: ERC721Options = defaults): string { + return printContract(buildERC721(opts)); +} + +export function isAccessControlRequired(opts: Partial): boolean { + return opts.mintable || opts.pausable || opts.upgradeable === 'uups'; +} + +export function buildERC721(opts: ERC721Options): Contract { + const allOpts = withDefaults(opts); + + const c = new ContractBuilder(allOpts.name); + + const { access, upgradeable, info } = allOpts; + + addBase(c, allOpts.name, allOpts.symbol); + + if (allOpts.baseUri) { + addBaseURI(c, allOpts.baseUri); + } + + if (allOpts.enumerable) { + addEnumerable(c); + } + + if (allOpts.uriStorage) { + addURIStorage(c); + } + + if (allOpts.pausable) { + addPausableExtension(c, access); + } + + if (allOpts.burnable) { + addBurnable(c); + } + + if (allOpts.mintable) { + addMintable(c, access, allOpts.incremental, allOpts.uriStorage); + } + + if (allOpts.votes) { + const clockMode = allOpts.votes === true ? clockModeDefault : allOpts.votes; + addVotes(c, allOpts.name, clockMode); + } + + setAccessControl(c, access); + setUpgradeable(c, upgradeable, access); + setInfo(c, info); + + return c; +} + +function addPausableExtension(c: ContractBuilder, access: Access) { + const ERC721Pausable = { + name: 'ERC721Pausable', + path: '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol', + }; + c.addParent(ERC721Pausable); + c.addOverride(ERC721Pausable, functions._update); + + addPauseFunctions(c, access); +} + +const ERC721 = { + name: 'ERC721', + path: '@openzeppelin/contracts/token/ERC721/ERC721.sol', +}; + +function addBase(c: ContractBuilder, name: string, symbol: string) { + c.addParent(ERC721, [name, symbol]); + + c.addOverride(ERC721, functions._update); + c.addOverride(ERC721, functions._increaseBalance); + c.addOverride(ERC721, functions.tokenURI); + c.addOverride(ERC721, supportsInterface); +} + +function addBaseURI(c: ContractBuilder, baseUri: string) { + c.addOverride(ERC721, functions._baseURI); + c.setFunctionBody([`return ${JSON.stringify(baseUri)};`], functions._baseURI); +} + +function addEnumerable(c: ContractBuilder) { + const ERC721Enumerable = { + name: 'ERC721Enumerable', + path: '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol', + }; + c.addParent(ERC721Enumerable); + + c.addOverride(ERC721Enumerable, functions._update); + c.addOverride(ERC721Enumerable, functions._increaseBalance); + c.addOverride(ERC721Enumerable, supportsInterface); +} + +function addURIStorage(c: ContractBuilder) { + const ERC721URIStorage = { + name: 'ERC721URIStorage', + path: '@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol', + }; + c.addParent(ERC721URIStorage); + + c.addOverride(ERC721URIStorage, functions.tokenURI); + c.addOverride(ERC721URIStorage, supportsInterface); +} + +function addBurnable(c: ContractBuilder) { + c.addParent({ + name: 'ERC721Burnable', + path: '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol', + }); +} + +function addMintable(c: ContractBuilder, access: Access, incremental = false, uriStorage = false) { + const fn = getMintFunction(incremental, uriStorage); + requireAccessControl(c, fn, access, 'MINTER', 'minter'); + + if (incremental) { + c.addVariable('uint256 private _nextTokenId;'); + c.addFunctionCode('uint256 tokenId = _nextTokenId++;', fn); + c.addFunctionCode('_safeMint(to, tokenId);', fn); + } else { + c.addFunctionCode('_safeMint(to, tokenId);', fn); + } + + if (uriStorage) { + c.addFunctionCode('_setTokenURI(tokenId, uri);', fn); + } + + if (incremental) c.addFunctionCode('return tokenId;', fn); +} + +function addVotes(c: ContractBuilder, name: string, clockMode: ClockMode) { + const EIP712 = { + name: 'EIP712', + path: '@openzeppelin/contracts/utils/cryptography/EIP712.sol', + }; + c.addParent(EIP712, [name, '1']); + + const ERC721Votes = { + name: 'ERC721Votes', + path: '@openzeppelin/contracts/token/ERC721/extensions/ERC721Votes.sol', + }; + c.addParent(ERC721Votes); + + c.addOverride(ERC721Votes, functions._update); + c.addOverride(ERC721Votes, functions._increaseBalance); + + setClockMode(c, ERC721Votes, clockMode); +} + +const functions = defineFunctions({ + _update: { + kind: 'internal' as const, + args: [ + { name: 'to', type: 'address' }, + { name: 'tokenId', type: 'uint256' }, + { name: 'auth', type: 'address' }, + ], + returns: ['address'], + }, + + tokenURI: { + kind: 'public' as const, + args: [{ name: 'tokenId', type: 'uint256' }], + returns: ['string memory'], + mutability: 'view' as const, + }, + + _baseURI: { + kind: 'internal' as const, + args: [], + returns: ['string memory'], + mutability: 'pure' as const, + }, + + _increaseBalance: { + kind: 'internal' as const, + args: [ + { name: 'account', type: 'address' }, + { name: 'value', type: 'uint128' }, + ], + }, +}); + +function getMintFunction(incremental: boolean, uriStorage: boolean): BaseFunction { + const fn: BaseFunction = { + name: 'safeMint', + kind: 'public' as const, + args: [{ name: 'to', type: 'address' }], + returns: incremental ? ['uint256'] : undefined, + }; + + if (!incremental) { + fn.args.push({ name: 'tokenId', type: 'uint256' }); + } + + if (uriStorage) { + fn.args.push({ name: 'uri', type: 'string memory' }); + } + + return fn; +} diff --git a/packages/core/confidential/src/error.ts b/packages/core/confidential/src/error.ts new file mode 100644 index 000000000..a26433319 --- /dev/null +++ b/packages/core/confidential/src/error.ts @@ -0,0 +1,7 @@ +export type OptionsErrorMessages = { [prop in string]?: string }; + +export class OptionsError extends Error { + constructor(readonly messages: OptionsErrorMessages) { + super('Invalid options'); + } +} diff --git a/packages/core/confidential/src/generate/account.ts b/packages/core/confidential/src/generate/account.ts new file mode 100644 index 000000000..27c4adda3 --- /dev/null +++ b/packages/core/confidential/src/generate/account.ts @@ -0,0 +1,20 @@ +import type { AccountOptions } from '../account'; +import { infoOptions } from '../set-info'; +import { generateAlternatives } from './alternatives'; + +const account = { + name: ['MyAccount'], + signatureValidation: [false, 'ERC1271', 'ERC7739'] as const, + ERC721Holder: [false, true] as const, + ERC1155Holder: [false, true] as const, + signer: ['ERC7702', 'ECDSA', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const, + batchedExecution: [false, true] as const, + ERC7579Modules: [false, 'AccountERC7579', 'AccountERC7579Hooked'] as const, + access: [false] as const, + upgradeable: [false] as const, + info: infoOptions, +}; + +export function* generateAccountOptions(): Generator> { + yield* generateAlternatives(account); +} diff --git a/packages/core/confidential/src/generate/alternatives.ts b/packages/core/confidential/src/generate/alternatives.ts new file mode 100644 index 000000000..b66e733cf --- /dev/null +++ b/packages/core/confidential/src/generate/alternatives.ts @@ -0,0 +1,32 @@ +type Blueprint = Record; + +type Alternatives = { + [k in keyof B]: B[k][number]; +}; + +export function* generateAlternatives(blueprint: B): Generator> { + const entries = Object.entries(blueprint).map(([key, values]) => ({ + key, + values, + current: 0, + limit: values.length, + })); + + for (; !done(); advance()) { + yield Object.fromEntries(entries.map(e => [e.key, e.values[e.current % e.limit]])) as Alternatives; + } + + function done() { + const last = entries[entries.length - 1]; + return last?.current === last?.limit; + } + + function advance() { + for (const e of entries) { + e.current = (e.current % e.limit) + 1; + if (e.current < e.limit) { + break; + } + } + } +} diff --git a/packages/core/confidential/src/generate/custom.ts b/packages/core/confidential/src/generate/custom.ts new file mode 100644 index 000000000..40207666a --- /dev/null +++ b/packages/core/confidential/src/generate/custom.ts @@ -0,0 +1,19 @@ +import type { CustomOptions } from '../custom'; +import { accessOptions } from '../set-access-control'; +import { infoOptions } from '../set-info'; +import { upgradeableOptions } from '../set-upgradeable'; +import { generateAlternatives } from './alternatives'; + +const booleans = [true, false]; + +const blueprint = { + name: ['MyContract'], + pausable: booleans, + access: accessOptions, + upgradeable: upgradeableOptions, + info: infoOptions, +}; + +export function* generateCustomOptions(): Generator> { + yield* generateAlternatives(blueprint); +} diff --git a/packages/core/confidential/src/generate/erc1155.ts b/packages/core/confidential/src/generate/erc1155.ts new file mode 100644 index 000000000..fdb9c09fe --- /dev/null +++ b/packages/core/confidential/src/generate/erc1155.ts @@ -0,0 +1,24 @@ +import type { ERC1155Options } from '../erc1155'; +import { accessOptions } from '../set-access-control'; +import { infoOptions } from '../set-info'; +import { upgradeableOptions } from '../set-upgradeable'; +import { generateAlternatives } from './alternatives'; + +const booleans = [true, false]; + +const blueprint = { + name: ['MyToken'], + uri: ['https://example.com/'], + burnable: booleans, + pausable: booleans, + mintable: booleans, + supply: booleans, + updatableUri: booleans, + access: accessOptions, + upgradeable: upgradeableOptions, + info: infoOptions, +}; + +export function* generateERC1155Options(): Generator> { + yield* generateAlternatives(blueprint); +} diff --git a/packages/core/confidential/src/generate/erc20.ts b/packages/core/confidential/src/generate/erc20.ts new file mode 100644 index 000000000..49040e511 --- /dev/null +++ b/packages/core/confidential/src/generate/erc20.ts @@ -0,0 +1,35 @@ +import { crossChainBridgingOptions, type ERC20Options } from '../erc20'; +import { accessOptions } from '../set-access-control'; +import { clockModeOptions } from '../set-clock-mode'; +import { infoOptions } from '../set-info'; +import { upgradeableOptions } from '../set-upgradeable'; +import { generateAlternatives } from './alternatives'; + +const booleans = [true, false]; + +const blueprint = { + name: ['MyToken'], + symbol: ['MTK'], + burnable: booleans, + pausable: booleans, + mintable: booleans, + callback: booleans, + permit: booleans, + votes: [...booleans, ...clockModeOptions] as const, + flashmint: booleans, + premint: ['1'], + premintChainId: ['10'], + crossChainBridging: crossChainBridgingOptions, + access: accessOptions, + upgradeable: upgradeableOptions, + info: infoOptions, +}; + +export function* generateERC20Options(): Generator> { + for (const opts of generateAlternatives(blueprint)) { + // crossChainBridging does not currently support upgradeable + if (!(opts.crossChainBridging && opts.upgradeable)) { + yield opts; + } + } +} diff --git a/packages/core/confidential/src/generate/erc721.ts b/packages/core/confidential/src/generate/erc721.ts new file mode 100644 index 000000000..1f91b7c30 --- /dev/null +++ b/packages/core/confidential/src/generate/erc721.ts @@ -0,0 +1,28 @@ +import type { ERC721Options } from '../erc721'; +import { accessOptions } from '../set-access-control'; +import { clockModeOptions } from '../set-clock-mode'; +import { infoOptions } from '../set-info'; +import { upgradeableOptions } from '../set-upgradeable'; +import { generateAlternatives } from './alternatives'; + +const booleans = [true, false]; + +const blueprint = { + name: ['MyToken'], + symbol: ['MTK'], + baseUri: ['https://example.com/'], + enumerable: booleans, + uriStorage: booleans, + burnable: booleans, + pausable: booleans, + mintable: booleans, + incremental: booleans, + access: accessOptions, + upgradeable: upgradeableOptions, + info: infoOptions, + votes: [...booleans, ...clockModeOptions] as const, +}; + +export function* generateERC721Options(): Generator> { + yield* generateAlternatives(blueprint); +} diff --git a/packages/core/confidential/src/generate/governor.ts b/packages/core/confidential/src/generate/governor.ts new file mode 100644 index 000000000..765f4e69f --- /dev/null +++ b/packages/core/confidential/src/generate/governor.ts @@ -0,0 +1,33 @@ +import type { GovernorOptions } from '../governor'; +import { defaults, timelockOptions, votesOptions } from '../governor'; +import { accessOptions } from '../set-access-control'; +import { clockModeOptions } from '../set-clock-mode'; +import { infoOptions } from '../set-info'; +import { upgradeableOptions } from '../set-upgradeable'; +import { generateAlternatives } from './alternatives'; + +const booleans = [true, false]; + +const blueprint = { + name: ['MyGovernor'], + delay: ['1 week'], + period: ['1 week'], + blockTime: [defaults.blockTime], + proposalThreshold: ['0', '1000'], + decimals: [18], + quorumMode: ['percent', 'absolute'] as const, + quorumPercent: [4], + quorumAbsolute: ['1000'], + votes: votesOptions, + clockMode: clockModeOptions, + timelock: timelockOptions, + storage: booleans, + settings: booleans, + upgradeable: upgradeableOptions, + access: accessOptions, + info: infoOptions, +}; + +export function* generateGovernorOptions(): Generator> { + yield* generateAlternatives(blueprint); +} diff --git a/packages/core/confidential/src/generate/sources.ts b/packages/core/confidential/src/generate/sources.ts new file mode 100644 index 000000000..c80ad5789 --- /dev/null +++ b/packages/core/confidential/src/generate/sources.ts @@ -0,0 +1,131 @@ +import { promises as fs } from 'fs'; +import path from 'path'; +import crypto from 'crypto'; + +import { generateERC20Options } from './erc20'; +import { generateERC721Options } from './erc721'; +import { generateERC1155Options } from './erc1155'; +import { generateStablecoinOptions } from './stablecoin'; +import { generateAccountOptions } from './account'; +import { generateGovernorOptions } from './governor'; +import { generateCustomOptions } from './custom'; +import type { GenericOptions, KindedOptions } from '../build-generic'; +import { buildGeneric } from '../build-generic'; +import { printContract } from '../print'; +import { OptionsError } from '../error'; +import { findCover } from '../utils/find-cover'; +import type { Contract } from '../contract'; + +type Subset = 'all' | 'minimal-cover'; + +type Kind = keyof KindedOptions; + +export function* generateOptions(kind?: Kind): Generator { + if (!kind || kind === 'ERC20') { + for (const kindOpts of generateERC20Options()) { + yield { kind: 'ERC20', ...kindOpts }; + } + } + + if (!kind || kind === 'ERC721') { + for (const kindOpts of generateERC721Options()) { + yield { kind: 'ERC721', ...kindOpts }; + } + } + + if (!kind || kind === 'ERC1155') { + for (const kindOpts of generateERC1155Options()) { + yield { kind: 'ERC1155', ...kindOpts }; + } + } + + if (!kind || kind === 'Stablecoin') { + for (const kindOpts of generateStablecoinOptions()) { + yield { kind: 'Stablecoin', ...kindOpts }; + } + } + + if (!kind || kind === 'RealWorldAsset') { + for (const kindOpts of generateStablecoinOptions()) { + yield { kind: 'RealWorldAsset', ...kindOpts }; + } + } + + if (!kind || kind === 'Account') { + for (const kindOpts of generateAccountOptions()) { + yield { kind: 'Account', ...kindOpts }; + } + } + + if (!kind || kind === 'Governor') { + for (const kindOpts of generateGovernorOptions()) { + yield { kind: 'Governor', ...kindOpts }; + } + } + + if (!kind || kind === 'Custom') { + for (const kindOpts of generateCustomOptions()) { + yield { kind: 'Custom', ...kindOpts }; + } + } +} + +interface GeneratedContract { + id: string; + options: GenericOptions; + contract: Contract; +} + +interface GeneratedSource extends GeneratedContract { + source: string; +} + +function generateContractSubset(subset: Subset, kind?: Kind): GeneratedContract[] { + const contracts = []; + + for (const options of generateOptions(kind)) { + const id = crypto.createHash('sha1').update(JSON.stringify(options)).digest().toString('hex'); + + try { + const contract = buildGeneric(options); + contracts.push({ id, options, contract }); + } catch (e: unknown) { + if (e instanceof OptionsError) { + continue; + } else { + throw e; + } + } + } + + if (subset === 'all') { + return contracts; + } else { + const getParents = (c: GeneratedContract) => c.contract.parents.map(p => p.contract.path); + return [ + ...findCover( + contracts.filter(c => c.options.upgradeable), + getParents, + ), + ...findCover( + contracts.filter(c => !c.options.upgradeable), + getParents, + ), + ]; + } +} + +export function* generateSources(subset: Subset, kind?: Kind): Generator { + for (const c of generateContractSubset(subset, kind)) { + const source = printContract(c.contract); + yield { ...c, source }; + } +} + +export async function writeGeneratedSources(dir: string, subset: Subset, kind?: Kind): Promise { + await fs.mkdir(dir, { recursive: true }); + + for (const { id, source } of generateSources(subset, kind)) { + await fs.writeFile(path.format({ dir, name: id, ext: '.sol' }), source); + } +} diff --git a/packages/core/confidential/src/generate/stablecoin.ts b/packages/core/confidential/src/generate/stablecoin.ts new file mode 100644 index 000000000..581f8e999 --- /dev/null +++ b/packages/core/confidential/src/generate/stablecoin.ts @@ -0,0 +1,52 @@ +import { crossChainBridgingOptions } from '../erc20'; +import { accessOptions } from '../set-access-control'; +import { infoOptions } from '../set-info'; +import type { StablecoinOptions } from '../stablecoin'; +import { generateAlternatives } from './alternatives'; + +const booleans = [true, false]; + +const erc20Basic = { + name: ['MyStablecoin'], + symbol: ['MST'], + burnable: [false] as const, + pausable: [false] as const, + mintable: [false] as const, + callback: [false] as const, + permit: [false] as const, + votes: [false] as const, + flashmint: [false] as const, + premint: ['1'], + premintChainId: [''], + crossChainBridging: [false] as const, + access: [false] as const, + info: [{}] as const, +}; + +const erc20Full = { + name: ['MyStablecoin'], + symbol: ['MST'], + burnable: [true] as const, + pausable: [true] as const, + mintable: [true] as const, + callback: [true] as const, + permit: [true] as const, + votes: ['timestamp'] as const, + flashmint: [true] as const, + premint: ['1'], + premintChainId: ['10'], + crossChainBridging: crossChainBridgingOptions, + access: accessOptions, + info: infoOptions, +}; + +const stablecoinExtensions = { + limitations: [false, 'allowlist', 'blocklist'] as const, + custodian: booleans, + upgradeable: [false] as const, +}; + +export function* generateStablecoinOptions(): Generator> { + yield* generateAlternatives({ ...erc20Basic, ...stablecoinExtensions }); + yield* generateAlternatives({ ...erc20Full, ...stablecoinExtensions }); +} diff --git a/packages/core/confidential/src/get-imports.test.ts b/packages/core/confidential/src/get-imports.test.ts new file mode 100644 index 000000000..d6f1509bb --- /dev/null +++ b/packages/core/confidential/src/get-imports.test.ts @@ -0,0 +1,97 @@ +import test from 'ava'; + +import { getImports } from './get-imports'; +import { buildERC20 } from './erc20'; +import { buildERC721 } from './erc721'; +import { generateSources } from './generate/sources'; +import { buildGeneric } from './build-generic'; + +test('erc20 basic', t => { + const c = buildERC20({ name: 'MyToken', symbol: 'MTK', permit: false }); + const sources = getImports(c); + const files = Object.keys(sources).sort(); + + t.deepEqual(files, [ + '@openzeppelin/contracts/interfaces/draft-IERC6093.sol', + '@openzeppelin/contracts/token/ERC20/ERC20.sol', + '@openzeppelin/contracts/token/ERC20/IERC20.sol', + '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol', + '@openzeppelin/contracts/utils/Context.sol', + ]); +}); + +test('erc721 auto increment', t => { + const c = buildERC721({ + name: 'MyToken', + symbol: 'MTK', + mintable: true, + incremental: true, + }); + const sources = getImports(c); + const files = Object.keys(sources).sort(); + + t.deepEqual(files, [ + '@openzeppelin/contracts/access/Ownable.sol', + '@openzeppelin/contracts/interfaces/draft-IERC6093.sol', + '@openzeppelin/contracts/token/ERC721/ERC721.sol', + '@openzeppelin/contracts/token/ERC721/IERC721.sol', + '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol', + '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol', + '@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol', + '@openzeppelin/contracts/utils/Context.sol', + '@openzeppelin/contracts/utils/Panic.sol', + '@openzeppelin/contracts/utils/Strings.sol', + '@openzeppelin/contracts/utils/introspection/ERC165.sol', + '@openzeppelin/contracts/utils/introspection/IERC165.sol', + '@openzeppelin/contracts/utils/math/Math.sol', + '@openzeppelin/contracts/utils/math/SafeCast.sol', + '@openzeppelin/contracts/utils/math/SignedMath.sol', + ]); +}); + +test('erc721 auto increment uups', t => { + const c = buildERC721({ + name: 'MyToken', + symbol: 'MTK', + mintable: true, + incremental: true, + upgradeable: 'uups', + }); + const sources = getImports(c); + const files = Object.keys(sources).sort(); + + t.deepEqual(files, [ + '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol', + '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol', + '@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol', + '@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol', + '@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol', + '@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol', + '@openzeppelin/contracts/interfaces/IERC1967.sol', + '@openzeppelin/contracts/interfaces/draft-IERC1822.sol', + '@openzeppelin/contracts/interfaces/draft-IERC6093.sol', + '@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol', + '@openzeppelin/contracts/proxy/beacon/IBeacon.sol', + '@openzeppelin/contracts/token/ERC721/IERC721.sol', + '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol', + '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol', + '@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol', + '@openzeppelin/contracts/utils/Address.sol', + '@openzeppelin/contracts/utils/Errors.sol', + '@openzeppelin/contracts/utils/Panic.sol', + '@openzeppelin/contracts/utils/StorageSlot.sol', + '@openzeppelin/contracts/utils/Strings.sol', + '@openzeppelin/contracts/utils/introspection/IERC165.sol', + '@openzeppelin/contracts/utils/math/Math.sol', + '@openzeppelin/contracts/utils/math/SafeCast.sol', + '@openzeppelin/contracts/utils/math/SignedMath.sol', + ]); +}); + +test('can get imports for all combinations', t => { + for (const { options } of generateSources('all')) { + const c = buildGeneric(options); + getImports(c); + } + t.pass(); +}); diff --git a/packages/core/confidential/src/get-imports.ts b/packages/core/confidential/src/get-imports.ts new file mode 100644 index 000000000..c7e390907 --- /dev/null +++ b/packages/core/confidential/src/get-imports.ts @@ -0,0 +1,45 @@ +import type { Contract } from './contract'; +import { reachable } from './utils/transitive-closure'; + +import contracts from '../openzeppelin-contracts'; +import { withHelpers } from './options'; + +export interface SolcInputSources { + [source: string]: { + content: string; + }; +} + +/** + * Gets the source code for all imports of a contract, including all transitive dependencies, + * in a format compatible with the Solidity compiler input's `sources` field. + * + * Does not include the contract itself (use `printContract` for that if needed). + * + * @param c The contract to get imports for. + * @returns A record of import paths to `content` that contains the source code for each contract. + */ +export function getImports(c: Contract): SolcInputSources { + const { transformImport } = withHelpers(c); + + const result: SolcInputSources = {}; + + const fileName = c.name + '.sol'; + + const dependencies = { + [fileName]: c.imports.map(i => transformImport(i).path), + ...contracts.dependencies, + }; + + const allImports = reachable(dependencies, fileName); + + for (const importPath of allImports) { + const source = contracts.sources[importPath]; + if (source === undefined) { + throw new Error(`Source for ${importPath} not found`); + } + result[importPath] = { content: source }; + } + + return result; +} diff --git a/packages/core/confidential/src/governor.test.ts b/packages/core/confidential/src/governor.test.ts new file mode 100644 index 000000000..3d7535024 --- /dev/null +++ b/packages/core/confidential/src/governor.test.ts @@ -0,0 +1,167 @@ +import test from 'ava'; +import { governor } from '.'; + +import type { GovernorOptions } from './governor'; +import { buildGovernor } from './governor'; +import { printContract } from './print'; + +function testGovernor(title: string, opts: Partial) { + test(title, t => { + const c = buildGovernor({ + name: 'MyGovernor', + delay: '1 week', + period: '1 week', + settings: false, + ...opts, + }); + t.snapshot(printContract(c)); + }); +} + +/** + * Tests external API for equivalence with internal API + */ +function testAPIEquivalence(title: string, opts?: GovernorOptions) { + test(title, t => { + t.is( + governor.print(opts), + printContract( + buildGovernor({ + name: 'MyGovernor', + delay: '1 day', + period: '1 week', + ...opts, + }), + ), + ); + }); +} + +testGovernor('governor with proposal threshold', { + proposalThreshold: '1', +}); + +testGovernor('governor with custom block time', { + blockTime: 6, +}); + +testGovernor('governor with custom decimals', { + decimals: 6, + proposalThreshold: '1', + quorumMode: 'absolute', + quorumAbsolute: '1', +}); + +testGovernor('governor with 0 decimals', { + decimals: 0, + proposalThreshold: '1', + quorumMode: 'absolute', + quorumAbsolute: '1', +}); + +testGovernor('governor with settings', { + settings: true, + proposalThreshold: '1', +}); + +testGovernor('governor with storage', { + storage: true, +}); + +testGovernor('governor with erc20votes', { + votes: 'erc20votes', +}); + +testGovernor('governor with erc721votes', { + votes: 'erc721votes', +}); + +testGovernor('governor with erc721votes omit decimals', { + votes: 'erc721votes', + decimals: 6, + proposalThreshold: '1', + quorumMode: 'absolute', + quorumAbsolute: '5', +}); + +testGovernor('governor with erc721votes settings omit decimals', { + votes: 'erc721votes', + decimals: 6, + proposalThreshold: '10', + settings: true, +}); + +testGovernor('governor with percent quorum', { + quorumMode: 'percent', + quorumPercent: 6, +}); + +testGovernor('governor with fractional percent quorum', { + quorumMode: 'percent', + quorumPercent: 0.5, +}); + +testGovernor('governor with openzeppelin timelock', { + timelock: 'openzeppelin', +}); + +testGovernor('governor with compound timelock', { + timelock: 'compound', +}); + +testGovernor('governor with blocknumber, updatable settings', { + clockMode: 'blocknumber', + delay: '1 day', + period: '2 weeks', + settings: true, +}); + +testGovernor('governor with blocknumber, non-updatable settings', { + clockMode: 'blocknumber', + delay: '1 block', + period: '2 weeks', + settings: false, +}); + +testGovernor('governor with timestamp clock mode, updatable settings', { + clockMode: 'timestamp', + delay: '1 day', + period: '2 weeks', + settings: true, +}); + +testGovernor('governor with timestamp clock mode, non-updatable settings', { + clockMode: 'timestamp', + delay: '1 day', + period: '2 weeks', + settings: false, +}); + +testGovernor('governor with erc20votes, upgradable', { + votes: 'erc20votes', + upgradeable: 'uups', +}); + +testAPIEquivalence('API default'); + +testAPIEquivalence('API basic', { + name: 'CustomGovernor', + delay: '2 weeks', + period: '2 week', +}); + +testAPIEquivalence('API basic upgradeable', { + name: 'CustomGovernor', + delay: '2 weeks', + period: '2 week', + upgradeable: 'uups', +}); + +test('API assert defaults', async t => { + t.is(governor.print(governor.defaults), governor.print()); +}); + +test('API isAccessControlRequired', async t => { + t.is(governor.isAccessControlRequired({ upgradeable: 'uups' }), false); + t.is(governor.isAccessControlRequired({}), false); +}); diff --git a/packages/core/confidential/src/governor.test.ts.md b/packages/core/confidential/src/governor.test.ts.md new file mode 100644 index 000000000..e49920a89 --- /dev/null +++ b/packages/core/confidential/src/governor.test.ts.md @@ -0,0 +1,1703 @@ +# Snapshot report for `src/governor.test.ts` + +The actual snapshot is saved in `governor.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## governor with proposal threshold + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function proposalThreshold() public pure override returns (uint256) {␊ + return 1e18;␊ + }␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with custom block time + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 100800; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 100800; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with custom decimals + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function proposalThreshold() public pure override returns (uint256) {␊ + return 1e6;␊ + }␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function quorum(uint256 blockNumber) public pure override returns (uint256) {␊ + return 1e6;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with 0 decimals + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function proposalThreshold() public pure override returns (uint256) {␊ + return 1;␊ + }␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function quorum(uint256 blockNumber) public pure override returns (uint256) {␊ + return 1;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with settings + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorSettings(50400 /* 1 week */, 50400 /* 1 week */, 1e18)␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function proposalThreshold()␊ + public␊ + view␊ + override(Governor, GovernorSettings)␊ + returns (uint256)␊ + {␊ + return super.proposalThreshold();␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with storage + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorStorage} from "@openzeppelin/contracts/governance/extensions/GovernorStorage.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorStorage, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _propose(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description, address proposer)␊ + internal␊ + override(Governor, GovernorStorage)␊ + returns (uint256)␊ + {␊ + return super._propose(targets, values, calldatas, description, proposer);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with erc20votes + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with erc721votes + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with erc721votes omit decimals + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function proposalThreshold() public pure override returns (uint256) {␊ + return 1;␊ + }␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function quorum(uint256 blockNumber) public pure override returns (uint256) {␊ + return 5;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with erc721votes settings omit decimals + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorSettings(50400 /* 1 week */, 50400 /* 1 week */, 10)␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function proposalThreshold()␊ + public␊ + view␊ + override(Governor, GovernorSettings)␊ + returns (uint256)␊ + {␊ + return super.proposalThreshold();␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with percent quorum + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(6)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with fractional percent quorum + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(5)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function quorumDenominator() public pure override returns (uint256) {␊ + return 1000;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with openzeppelin timelock + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with compound timelock + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockCompound} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {ICompoundTimelock} from "@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockCompound {␊ + constructor(IVotes _token, ICompoundTimelock _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockCompound(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockCompound)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockCompound)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockCompound)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockCompound)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockCompound)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockCompound)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with blocknumber, updatable settings + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorSettings(7200 /* 1 day */, 100800 /* 2 weeks */, 0)␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function proposalThreshold()␊ + public␊ + view␊ + override(Governor, GovernorSettings)␊ + returns (uint256)␊ + {␊ + return super.proposalThreshold();␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with blocknumber, non-updatable settings + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 1; // 1 block␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 100800; // 2 weeks␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with timestamp clock mode, updatable settings + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorSettings(1 days, 2 weeks, 0)␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function proposalThreshold()␊ + public␊ + view␊ + override(Governor, GovernorSettings)␊ + returns (uint256)␊ + {␊ + return super.proposalThreshold();␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with timestamp clock mode, non-updatable settings + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";␊ + import {GovernorCountingSimple} from "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";␊ + import {GovernorTimelockControl} from "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";␊ + import {GovernorVotes} from "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";␊ + import {GovernorVotesQuorumFraction} from "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {TimelockController} from "@openzeppelin/contracts/governance/TimelockController.sol";␊ + ␊ + contract MyGovernor is Governor, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {␊ + constructor(IVotes _token, TimelockController _timelock)␊ + Governor("MyGovernor")␊ + GovernorVotes(_token)␊ + GovernorVotesQuorumFraction(4)␊ + GovernorTimelockControl(_timelock)␊ + {}␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 1 days;␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 2 weeks;␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(Governor, GovernorTimelockControl)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(Governor, GovernorTimelockControl)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` + +## governor with erc20votes, upgradable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {GovernorUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/GovernorUpgradeable.sol";␊ + import {GovernorCountingSimpleUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorCountingSimpleUpgradeable.sol";␊ + import {GovernorTimelockControlUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorTimelockControlUpgradeable.sol";␊ + import {GovernorVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesUpgradeable.sol";␊ + import {GovernorVotesQuorumFractionUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol";␊ + import {IVotes} from "@openzeppelin/contracts/governance/utils/IVotes.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {TimelockControllerUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/TimelockControllerUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyGovernor is Initializable, GovernorUpgradeable, GovernorCountingSimpleUpgradeable, GovernorVotesUpgradeable, GovernorVotesQuorumFractionUpgradeable, GovernorTimelockControlUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(IVotes _token, TimelockControllerUpgradeable _timelock)␊ + public initializer␊ + {␊ + __Governor_init("MyGovernor");␊ + __GovernorCountingSimple_init();␊ + __GovernorVotes_init(_token);␊ + __GovernorVotesQuorumFraction_init(4);␊ + __GovernorTimelockControl_init(_timelock);␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function votingDelay() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function votingPeriod() public pure override returns (uint256) {␊ + return 50400; // 1 week␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyGovernance␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function state(uint256 proposalId)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (ProposalState)␊ + {␊ + return super.state(proposalId);␊ + }␊ + ␊ + function proposalNeedsQueuing(uint256 proposalId)␊ + public␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (bool)␊ + {␊ + return super.proposalNeedsQueuing(proposalId);␊ + }␊ + ␊ + function _queueOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (uint48)␊ + {␊ + return super._queueOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executeOperations(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + {␊ + super._executeOperations(proposalId, targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)␊ + internal␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (uint256)␊ + {␊ + return super._cancel(targets, values, calldatas, descriptionHash);␊ + }␊ + ␊ + function _executor()␊ + internal␊ + view␊ + override(GovernorUpgradeable, GovernorTimelockControlUpgradeable)␊ + returns (address)␊ + {␊ + return super._executor();␊ + }␊ + }␊ + ` diff --git a/packages/core/confidential/src/governor.test.ts.snap b/packages/core/confidential/src/governor.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..63d7cb468e9308c72c3d501ca633eea81519e06c GIT binary patch literal 2350 zcmV+}3DNdJRzVy?i*v(1FO}U9W>+9W+R5n0c90l1 z)@SMZkROW(00000000B+o!xF5#}&uj7DWMBL6Ex^Xpw;%Aap=!DOIus>mmVcBoWXg zPGuMUKqIVnN7B^0GwYdINwndM0DXfzLHZWG>t$0E=v~pE=w*Rk^dXA<7?QIeB*i7I zCH2>h&E45E=bV|HJ-~?(FrZhNUFC~&>1(Dr`J`{`B1{qU z|1PPXHN)enu7!`bQ-&uCYLJ&}gb?BhuC$CjEo3J%og8WLjPfoi>rIYye(Y{~aq?%x zckT?0xKlozitc2hYtGt=cXrCn3L13^>b!ilmi~JZ^HjuO$$DZ|tj=8$#m52jNEAy- z60wr`lt`*$$rb6ujO*>)dv|m1B!AgCvPHM{_S1vKUd}}_G>>TD_8Z9G?d|k>`^0g` z7P+AG*_f^#Q^`aVTgLU}IONG0B_|>X#0BH0gU%IkN4il&(&sUg)F;P%a+oj2n+1K9 zb~QDM42I*t9}aD1!rXN+m@XWaz#L4P(+}CvE0?!SCBv>$Kezr|~syxY}q}PvKbv87aahFdXt=XC)^jBvjM_dh)mS!SO3{QG7t>4X#d^h@JoIJm#IluhcB7X(ScA@z`KdG+ zlht|bY|QPP+r$&HGsd3ztx);Ej5ltmlF|9qnqiN(ZT9eDrA0_mKq1LPzlZ!u$L|U(Zv<83Y#TyOdAk@R-W^`4E%< zN?4r$mVgpK32pIHX)=Nm>L}rdHYN1N0m6SRK=>Ab06+jB5CB3F+yW1p;sM|QZ~!;} z9L(xuzyaXEHm)fgoZD=ms7@ZS6=bmf(jtQZr3^EX!C~&;W?dO6D~})8v@{p;G4o}W zwlNu-I%zmhocHo*p1kLDN!78WV&QssLm}e7sS$q#hc~sw%>Nl9o(hcsD}WWi%Jol1 zz)B6Q#06NaN+$ycfCIL1jd9@JS{xuEWEz$0fCE&nqjDXU z>#w&0#r(MNtKw98lkHbQHG_( z=y3I@{~q>0VGk5w21EcN01?N0f_@aW`GWoBYOj4_m8%AV3fx$gEBVf&f8m;~FE#Pi+Jl4YG)N=p#1)`~ZFc zKNf=@sLw`j0$>0z02lxa00ylAgSTxk@I)AinET_P;6D}=`~y(X5DGGn&x;B&X*UN8 zjK#(SlR7-7+!xX@6Wu8ZSO9li7a8RD@ykm&_9Xf+ySgS47#P-`3DU`EG* z4i@BP;K8iZaq0P>*1E=kuwes2`sE`${qm76iKE2!B&r|tGvk*QE--9iLPhp!6UhoC zDptB8`~J2mzV_XIUVGi!%Z_cQF}X^Qq9FT9k0Rs=$`+v@ds*Xaq&Se`XrrI5eCxIz zVHTF+*cwAHT=0!)DCYJ*EsFUDNe}FV0$^Y#)Kc$++RD=p>590>Tt~)LX>U1LEpxU5 zfK#^UhUYp!37~{F`l&P-K?!w~aL=ZMU-8%D%SH$;TOr&A_8TniO`frJMV9^jEB z;gOY2c%+FA)ip6VG8+i|k=a0IqrzKY7BEX|CL@@oj#(Z|!z@#$IR0XB%b$?qK#BuM zffUDbr#MpN8TV^}jguQWP2o$QKsLYw;K8g;1|9$pY~vc^!8@hj)7$QyXHiESol4hF zh@cDtZ~ol^fj_@_jUeze)srTQPKeqz;$hP&J{XZS6)H6Ec_KkfR;e&a7NS#qALDpn zA*vK5PY)!EQ>V6{1tQAbofn#MB`hWWL@!^a;j+$5y zGXc#khYT0u5dn43R@tODS;wMWWxM)2uS*K1%?6u U@^5bP% = { + ...commonDefaults, + name: 'MyGovernor', + delay: '1 day', + period: '1 week', + + votes: 'erc20votes', + clockMode: clockModeDefault, + timelock: 'openzeppelin', + blockTime: 12, + decimals: 18, + proposalThreshold: '0', + quorumMode: 'percent', + quorumPercent: 4, + quorumAbsolute: '', + storage: false, + settings: true, +} as const; + +export const votesOptions = ['erc20votes', 'erc721votes'] as const; +export type VotesOptions = (typeof votesOptions)[number]; + +export const timelockOptions = [false, 'openzeppelin', 'compound'] as const; +export type TimelockOptions = (typeof timelockOptions)[number]; + +export function printGovernor(opts: GovernorOptions = defaults): string { + return printContract(buildGovernor(opts)); +} + +export interface GovernorOptions extends CommonOptions { + name: string; + delay: string; + period: string; + blockTime?: number; + proposalThreshold?: string; + decimals?: number; + quorumMode?: 'percent' | 'absolute'; + quorumPercent?: number; + quorumAbsolute?: string; + votes?: VotesOptions; + clockMode?: ClockMode; + timelock?: TimelockOptions; + storage?: boolean; + settings?: boolean; +} + +export function isAccessControlRequired(_: Partial): boolean { + return false; +} + +function withDefaults(opts: GovernorOptions): Required { + return { + ...opts, + ...withCommonDefaults(opts), + decimals: opts.decimals ?? defaults.decimals, + blockTime: opts.blockTime || defaults.blockTime, + quorumPercent: opts.quorumPercent ?? defaults.quorumPercent, + quorumAbsolute: opts.quorumAbsolute ?? defaults.quorumAbsolute, + proposalThreshold: opts.proposalThreshold || defaults.proposalThreshold, + settings: opts.settings ?? defaults.settings, + storage: opts.storage ?? defaults.storage, + quorumMode: opts.quorumMode ?? defaults.quorumMode, + votes: opts.votes ?? defaults.votes, + clockMode: opts.clockMode ?? defaults.clockMode, + timelock: opts.timelock ?? defaults.timelock, + }; +} + +export function buildGovernor(opts: GovernorOptions): Contract { + const allOpts = withDefaults(opts); + + const c = new ContractBuilder(allOpts.name); + + validateDecimals(allOpts.decimals); + + addBase(c, allOpts); + addSettings(c, allOpts); + addCounting(c); + addStorage(c, allOpts); + addVotes(c); + addQuorum(c, allOpts); + addTimelock(c, allOpts); + + setUpgradeableGovernor(c, allOpts.upgradeable); + setInfo(c, allOpts.info); + + return c; +} + +const Governor: ImportContract = { + name: 'Governor', + path: '@openzeppelin/contracts/governance/Governor.sol', +}; + +function addBase(c: ContractBuilder, { name }: GovernorOptions) { + c.addParent(Governor, [name]); + c.addOverride(Governor, functions.state); + c.addOverride(Governor, functions.propose); + c.addOverride(Governor, functions.proposalNeedsQueuing); + c.addOverride(Governor, functions.proposalThreshold); + c.addOverride(Governor, functions._propose); + c.addOverride(Governor, functions._queueOperations); + c.addOverride(Governor, functions._executeOperations); + c.addOverride(Governor, functions._cancel); + c.addOverride(Governor, functions._executor); + c.addOverride(Governor, supportsInterface); +} + +function addSettings(c: ContractBuilder, allOpts: Required) { + if (allOpts.settings) { + const GovernorSettings = { + name: 'GovernorSettings', + path: '@openzeppelin/contracts/governance/extensions/GovernorSettings.sol', + }; + c.addParent(GovernorSettings, [ + getVotingDelay(allOpts), + getVotingPeriod(allOpts), + { lit: getProposalThreshold(allOpts) }, + ]); + c.addOverride(GovernorSettings, functions.votingDelay, 'view'); + c.addOverride(GovernorSettings, functions.votingPeriod, 'view'); + c.addOverride(GovernorSettings, functions.proposalThreshold, 'view'); + } else { + setVotingParameters(c, allOpts); + setProposalThreshold(c, allOpts); + } +} + +function getVotingDelay(opts: Required): { lit: string } | { note: string; value: number } { + try { + if (opts.clockMode === 'timestamp') { + return { + lit: durationToTimestamp(opts.delay), + }; + } else { + return { + value: durationToBlocks(opts.delay, opts.blockTime), + note: opts.delay, + }; + } + } catch (e) { + if (e instanceof Error) { + throw new OptionsError({ + delay: e.message, + }); + } else { + throw e; + } + } +} + +function getVotingPeriod(opts: Required): { lit: string } | { note: string; value: number } { + try { + if (opts.clockMode === 'timestamp') { + return { + lit: durationToTimestamp(opts.period), + }; + } else { + return { + value: durationToBlocks(opts.period, opts.blockTime), + note: opts.period, + }; + } + } catch (e) { + if (e instanceof Error) { + throw new OptionsError({ + period: e.message, + }); + } else { + throw e; + } + } +} + +function validateDecimals(decimals: number) { + if (!/^\d+$/.test(decimals.toString())) { + throw new OptionsError({ + decimals: 'Not a valid number', + }); + } +} + +function getProposalThreshold({ proposalThreshold, decimals, votes }: Required): string { + if (!/^\d+$/.test(proposalThreshold)) { + throw new OptionsError({ + proposalThreshold: 'Not a valid number', + }); + } + + if (/^0+$/.test(proposalThreshold) || decimals === 0 || votes === 'erc721votes') { + return proposalThreshold; + } else { + return `${proposalThreshold}e${decimals}`; + } +} + +function setVotingParameters(c: ContractBuilder, opts: Required) { + const delayBlocks = getVotingDelay(opts); + if ('lit' in delayBlocks) { + c.setFunctionBody([`return ${delayBlocks.lit};`], functions.votingDelay); + } else { + c.setFunctionBody([`return ${delayBlocks.value}; // ${delayBlocks.note}`], functions.votingDelay); + } + c.addOverride(Governor, functions.votingDelay); + + const periodBlocks = getVotingPeriod(opts); + if ('lit' in periodBlocks) { + c.setFunctionBody([`return ${periodBlocks.lit};`], functions.votingPeriod); + } else { + c.setFunctionBody([`return ${periodBlocks.value}; // ${periodBlocks.note}`], functions.votingPeriod); + } + c.addOverride(Governor, functions.votingPeriod); +} + +function setProposalThreshold(c: ContractBuilder, opts: Required) { + const threshold = getProposalThreshold(opts); + const nonZeroThreshold = parseInt(threshold) !== 0; + + if (nonZeroThreshold) { + c.setFunctionBody([`return ${threshold};`], functions.proposalThreshold); + } +} + +function addCounting(c: ContractBuilder) { + c.addParent({ + name: 'GovernorCountingSimple', + path: '@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol', + }); +} + +function addVotes(c: ContractBuilder) { + const tokenArg = '_token'; + + c.addImportOnly({ + name: 'IVotes', + path: `@openzeppelin/contracts/governance/utils/IVotes.sol`, + transpiled: false, + }); + c.addConstructorArgument({ + type: { + name: 'IVotes', + transpiled: false, + }, + name: tokenArg, + }); + + c.addParent( + { + name: 'GovernorVotes', + path: `@openzeppelin/contracts/governance/extensions/GovernorVotes.sol`, + }, + [{ lit: tokenArg }], + ); +} + +export const numberPattern = /^(?!$)(\d*)(?:\.(\d+))?(?:e(\d+))?$/; + +function addQuorum(c: ContractBuilder, opts: Required) { + if (opts.quorumMode === 'percent') { + if (opts.quorumPercent > 100) { + throw new OptionsError({ + quorumPercent: 'Invalid percentage', + }); + } + + const { quorumFractionNumerator, quorumFractionDenominator } = getQuorumFractionComponents(opts.quorumPercent); + + const GovernorVotesQuorumFraction = { + name: 'GovernorVotesQuorumFraction', + path: '@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol', + }; + + if (quorumFractionDenominator !== undefined) { + c.addOverride(GovernorVotesQuorumFraction, functions.quorumDenominator); + c.setFunctionBody([`return ${quorumFractionDenominator};`], functions.quorumDenominator, 'pure'); + } + + c.addParent(GovernorVotesQuorumFraction, [quorumFractionNumerator]); + c.addOverride(GovernorVotesQuorumFraction, functions.quorum); + } else if (opts.quorumMode === 'absolute') { + if (!numberPattern.test(opts.quorumAbsolute)) { + throw new OptionsError({ + quorumAbsolute: 'Not a valid number', + }); + } + + const returnStatement = + opts.decimals === 0 || opts.votes === 'erc721votes' + ? `return ${opts.quorumAbsolute};` + : `return ${opts.quorumAbsolute}e${opts.decimals};`; + + c.setFunctionBody([returnStatement], functions.quorum, 'pure'); + c.addOverride(Governor, functions.quorum); + } +} + +const timelockModules = { + openzeppelin: { + timelockType: { + name: 'TimelockController', + path: `@openzeppelin/contracts/governance/TimelockController.sol`, + }, + timelockParent: { + name: 'GovernorTimelockControl', + path: `@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol`, + }, + }, + compound: { + timelockType: { + name: 'ICompoundTimelock', + path: `@openzeppelin/contracts/vendor/compound/ICompoundTimelock.sol`, + transpiled: false, + }, + timelockParent: { + name: 'GovernorTimelockCompound', + path: `@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol`, + }, + }, +} as const; + +function getQuorumFractionComponents(quorumPercent: number): { + quorumFractionNumerator: number; + quorumFractionDenominator: string | undefined; +} { + let quorumFractionNumerator = quorumPercent; + let quorumFractionDenominator = undefined; + + const quorumPercentSegments = quorumPercent.toString().split('.'); + if (quorumPercentSegments.length > 2) { + throw new OptionsError({ + quorumPercent: 'Invalid percentage', + }); + } else if ( + quorumPercentSegments.length == 2 && + quorumPercentSegments[0] !== undefined && + quorumPercentSegments[1] !== undefined + ) { + quorumFractionNumerator = parseInt(quorumPercentSegments[0].concat(quorumPercentSegments[1])); + const decimals = quorumPercentSegments[1].length; + quorumFractionDenominator = '100'; + while (quorumFractionDenominator.length < decimals + 3) { + quorumFractionDenominator += '0'; + } + } + return { quorumFractionNumerator, quorumFractionDenominator }; +} + +function addTimelock(c: ContractBuilder, { timelock }: Required) { + if (timelock === false) { + return; + } + + const timelockArg = '_timelock'; + const { timelockType, timelockParent } = timelockModules[timelock]; + + c.addImportOnly(timelockType); + c.addConstructorArgument({ + type: timelockType, + name: timelockArg, + }); + + c.addParent(timelockParent, [{ lit: timelockArg }]); + c.addOverride(timelockParent, functions._queueOperations); + c.addOverride(timelockParent, functions._executeOperations); + c.addOverride(timelockParent, functions._cancel); + c.addOverride(timelockParent, functions._executor); + c.addOverride(timelockParent, functions.state); + c.addOverride(timelockParent, functions.proposalNeedsQueuing); +} + +function addStorage(c: ContractBuilder, { storage }: GovernorOptions) { + if (storage) { + const GovernorStorage = { + name: 'GovernorStorage', + path: '@openzeppelin/contracts/governance/extensions/GovernorStorage.sol', + }; + c.addParent(GovernorStorage); + c.addOverride(GovernorStorage, functions._propose); + } +} + +const functions = defineFunctions({ + votingDelay: { + args: [], + returns: ['uint256'], + kind: 'public', + mutability: 'pure', + }, + votingPeriod: { + args: [], + returns: ['uint256'], + kind: 'public', + mutability: 'pure', + }, + proposalThreshold: { + args: [], + returns: ['uint256'], + kind: 'public', + mutability: 'pure', + }, + proposalNeedsQueuing: { + args: [{ name: 'proposalId', type: 'uint256' }], + returns: ['bool'], + kind: 'public', + mutability: 'view', + }, + quorum: { + args: [{ name: 'blockNumber', type: 'uint256' }], + returns: ['uint256'], + kind: 'public', + mutability: 'view', + }, + quorumDenominator: { + args: [], + returns: ['uint256'], + kind: 'public', + mutability: 'view', + }, + propose: { + args: [ + { name: 'targets', type: 'address[] memory' }, + { name: 'values', type: 'uint256[] memory' }, + { name: 'calldatas', type: 'bytes[] memory' }, + { name: 'description', type: 'string memory' }, + ], + returns: ['uint256'], + kind: 'public', + }, + _propose: { + args: [ + { name: 'targets', type: 'address[] memory' }, + { name: 'values', type: 'uint256[] memory' }, + { name: 'calldatas', type: 'bytes[] memory' }, + { name: 'description', type: 'string memory' }, + { name: 'proposer', type: 'address' }, + ], + returns: ['uint256'], + kind: 'internal', + }, + _queueOperations: { + args: [ + { name: 'proposalId', type: 'uint256' }, + { name: 'targets', type: 'address[] memory' }, + { name: 'values', type: 'uint256[] memory' }, + { name: 'calldatas', type: 'bytes[] memory' }, + { name: 'descriptionHash', type: 'bytes32' }, + ], + kind: 'internal', + returns: ['uint48'], + }, + _executeOperations: { + args: [ + { name: 'proposalId', type: 'uint256' }, + { name: 'targets', type: 'address[] memory' }, + { name: 'values', type: 'uint256[] memory' }, + { name: 'calldatas', type: 'bytes[] memory' }, + { name: 'descriptionHash', type: 'bytes32' }, + ], + kind: 'internal', + }, + _cancel: { + args: [ + { name: 'targets', type: 'address[] memory' }, + { name: 'values', type: 'uint256[] memory' }, + { name: 'calldatas', type: 'bytes[] memory' }, + { name: 'descriptionHash', type: 'bytes32' }, + ], + returns: ['uint256'], + kind: 'internal', + }, + state: { + args: [{ name: 'proposalId', type: 'uint256' }], + returns: ['ProposalState'], + kind: 'public', + mutability: 'view', + }, + _executor: { + args: [], + returns: ['address'], + kind: 'internal', + mutability: 'view', + }, +}); diff --git a/packages/core/confidential/src/index.ts b/packages/core/confidential/src/index.ts new file mode 100644 index 000000000..209c432c3 --- /dev/null +++ b/packages/core/confidential/src/index.ts @@ -0,0 +1,32 @@ +export type { GenericOptions, KindedOptions } from './build-generic'; +export { buildGeneric } from './build-generic'; + +export type { Contract } from './contract'; +export { ContractBuilder } from './contract'; + +export { printContract } from './print'; + +export type { Access } from './set-access-control'; +export type { Upgradeable } from './set-upgradeable'; +export type { Info } from './set-info'; + +export { premintPattern, chainIdPattern } from './erc20'; +export { defaults as infoDefaults } from './set-info'; + +export type { OptionsErrorMessages } from './error'; +export { OptionsError } from './error'; + +export type { Kind } from './kind'; +export { sanitizeKind } from './kind'; + +export { erc20, erc721, erc1155, stablecoin, realWorldAsset, account, governor, custom } from './api'; + +export { compatibleContractsSemver } from './utils/version'; + +export type { ERC20Options } from './erc20'; +export type { ERC721Options } from './erc721'; +export type { ERC1155Options } from './erc1155'; +export type { StablecoinOptions } from './stablecoin'; +export type { AccountOptions } from './account'; +export type { GovernorOptions } from './governor'; +export type { CustomOptions } from './custom'; diff --git a/packages/core/confidential/src/infer-transpiled.test.ts b/packages/core/confidential/src/infer-transpiled.test.ts new file mode 100644 index 000000000..cccffeeab --- /dev/null +++ b/packages/core/confidential/src/infer-transpiled.test.ts @@ -0,0 +1,12 @@ +import test from 'ava'; +import { inferTranspiled } from './infer-transpiled'; + +test('infer transpiled', t => { + t.true(inferTranspiled({ name: 'Foo' })); + t.true(inferTranspiled({ name: 'Foo', transpiled: true })); + t.false(inferTranspiled({ name: 'Foo', transpiled: false })); + + t.false(inferTranspiled({ name: 'IFoo' })); + t.true(inferTranspiled({ name: 'IFoo', transpiled: true })); + t.false(inferTranspiled({ name: 'IFoo', transpiled: false })); +}); diff --git a/packages/core/confidential/src/infer-transpiled.ts b/packages/core/confidential/src/infer-transpiled.ts new file mode 100644 index 000000000..f338ea6a4 --- /dev/null +++ b/packages/core/confidential/src/infer-transpiled.ts @@ -0,0 +1,5 @@ +import type { ReferencedContract } from './contract'; + +export function inferTranspiled(c: ReferencedContract): boolean { + return c.transpiled ?? !/^I[A-Z]/.test(c.name); +} diff --git a/packages/core/confidential/src/kind.ts b/packages/core/confidential/src/kind.ts new file mode 100644 index 000000000..7e1ea1f52 --- /dev/null +++ b/packages/core/confidential/src/kind.ts @@ -0,0 +1,33 @@ +import type { GenericOptions } from './build-generic'; + +export type Kind = GenericOptions['kind']; + +export function sanitizeKind(kind: unknown): Kind { + if (typeof kind === 'string') { + const sanitized = kind.replace(/^(ERC|.)/i, c => c.toUpperCase()).replace(/^(RealWorldAsset)$/i, 'RealWorldAsset'); + if (isKind(sanitized)) { + return sanitized; + } + } + return 'ERC20'; +} + +function isKind(value: Kind | T): value is Kind { + switch (value) { + case 'ERC20': + case 'ERC1155': + case 'ERC721': + case 'Stablecoin': + case 'RealWorldAsset': + case 'Account': + case 'Governor': + case 'Custom': + return true; + + default: { + // Static assert that we've checked all kinds. + const _: T = value; + return false; + } + } +} diff --git a/packages/core/confidential/src/options.ts b/packages/core/confidential/src/options.ts new file mode 100644 index 000000000..6e800715f --- /dev/null +++ b/packages/core/confidential/src/options.ts @@ -0,0 +1,49 @@ +import path from 'path'; + +import type { Contract, ReferencedContract, ImportContract } from './contract'; +import { inferTranspiled } from './infer-transpiled'; + +const upgradeableName = (n: string) => { + if (n === 'Initializable') { + return n; + } else { + return n.replace(/(Upgradeable)?(?=\.|$)/, 'Upgradeable'); + } +}; + +const upgradeableImport = (p: ImportContract): ImportContract => { + const { dir, ext, name } = path.parse(p.path); + // Use path.posix to get forward slashes + return { + ...p, + name: upgradeableName(p.name), // Contract name + path: path.posix.format({ + ext, + dir: dir.replace(/^@openzeppelin\/contracts/, '@openzeppelin/contracts-upgradeable'), + name: upgradeableName(name), // Solidity file name + }), + }; +}; + +export interface Options { + transformImport?: (parent: ImportContract) => ImportContract; +} + +export interface Helpers extends Required { + upgradeable: boolean; + transformName: (name: ReferencedContract) => string; +} + +export function withHelpers(contract: Contract, opts: Options = {}): Helpers { + const contractUpgradeable = contract.upgradeable; + const transformName = (n: ReferencedContract) => + contractUpgradeable && inferTranspiled(n) ? upgradeableName(n.name) : n.name; + return { + upgradeable: contractUpgradeable, + transformName, + transformImport: p1 => { + const p2 = contractUpgradeable && inferTranspiled(p1) ? upgradeableImport(p1) : p1; + return opts.transformImport?.(p2) ?? p2; + }, + }; +} diff --git a/packages/core/confidential/src/print-versioned.ts b/packages/core/confidential/src/print-versioned.ts new file mode 100644 index 000000000..d4bde0aad --- /dev/null +++ b/packages/core/confidential/src/print-versioned.ts @@ -0,0 +1,14 @@ +import contracts from '../openzeppelin-contracts'; +import type { Contract } from './contract'; +import { printContract } from './print'; + +export function printContractVersioned(contract: Contract): string { + return printContract(contract, { + transformImport: p => { + return { + ...p, + path: p.path.replace(/^@openzeppelin\/contracts(-upgradeable)?/, `$&@${contracts.version}`), + }; + }, + }); +} diff --git a/packages/core/confidential/src/print.ts b/packages/core/confidential/src/print.ts new file mode 100644 index 000000000..7585baac7 --- /dev/null +++ b/packages/core/confidential/src/print.ts @@ -0,0 +1,277 @@ +import type { + Contract, + Parent, + ContractFunction, + FunctionArgument, + Value, + NatspecTag, + ImportContract, +} from './contract'; +import type { Options, Helpers } from './options'; +import { withHelpers } from './options'; + +import type { Lines } from './utils/format-lines'; +import { formatLines, spaceBetween } from './utils/format-lines'; +import { mapValues } from './utils/map-values'; +import SOLIDITY_VERSION from './solidity-version.json'; +import { inferTranspiled } from './infer-transpiled'; +import { compatibleContractsSemver } from './utils/version'; +import { stringifyUnicodeSafe } from './utils/sanitize'; +import { importsCommunityContracts } from './utils/imports-libraries'; +import { getCommunityContractsGitCommit } from './utils/community-contracts-git-commit'; + +export function printContract(contract: Contract, opts?: Options): string { + const helpers = withHelpers(contract, opts); + + const fns = mapValues(sortedFunctions(contract), fns => fns.map(fn => printFunction(fn, helpers))); + + const hasOverrides = fns.override.some(l => l.length > 0); + + return formatLines( + ...spaceBetween( + [ + `// SPDX-License-Identifier: ${contract.license}`, + printCompatibleLibraryVersions(contract), + `pragma solidity ^${SOLIDITY_VERSION};`, + ], + + printImports(contract.imports, helpers), + + [ + ...printNatspecTags(contract.natspecTags), + [`contract ${contract.name}`, ...printInheritance(contract, helpers), '{'].join(' '), + + spaceBetween( + contract.variables, + printConstructor(contract, helpers), + ...fns.code, + ...fns.modifiers, + hasOverrides ? [`// The following functions are overrides required by Solidity.`] : [], + ...fns.override, + ), + + `}`, + ], + ), + ); +} + +function printCompatibleLibraryVersions(contract: Contract): string { + let result = `// Compatible with OpenZeppelin Contracts ${compatibleContractsSemver}`; + if (importsCommunityContracts(contract)) { + try { + const commit = getCommunityContractsGitCommit(); + result += ` and Community Contracts commit ${commit}`; + } catch (e) { + console.error(e); + } + } + return result; +} + +function printInheritance(contract: Contract, { transformName }: Helpers): [] | [string] { + if (contract.parents.length > 0) { + return ['is ' + contract.parents.map(p => transformName(p.contract)).join(', ')]; + } else { + return []; + } +} + +function printConstructor(contract: Contract, helpers: Helpers): Lines[] { + const hasParentParams = contract.parents.some(p => p.params.length > 0); + const hasConstructorCode = contract.constructorCode.length > 0; + const parentsWithInitializers = contract.parents.filter(hasInitializer); + if (hasParentParams || hasConstructorCode || (helpers.upgradeable && parentsWithInitializers.length > 0)) { + const parents = parentsWithInitializers.flatMap(p => printParentConstructor(p, helpers)); + const modifiers = helpers.upgradeable ? ['public initializer'] : parents; + const args = contract.constructorArgs.map(a => printArgument(a, helpers)); + const body = helpers.upgradeable + ? spaceBetween( + parents.map(p => p + ';'), + contract.constructorCode, + ) + : contract.constructorCode; + const head = helpers.upgradeable ? 'function initialize' : 'constructor'; + const constructor = printFunction2([], head, args, modifiers, body); + if (!helpers.upgradeable) { + return constructor; + } else { + return spaceBetween(DISABLE_INITIALIZERS, constructor); + } + } else if (!helpers.upgradeable) { + return []; + } else { + return DISABLE_INITIALIZERS; + } +} + +const DISABLE_INITIALIZERS = [ + '/// @custom:oz-upgrades-unsafe-allow constructor', + 'constructor() {', + ['_disableInitializers();'], + '}', +]; + +function hasInitializer(parent: Parent) { + // CAUTION + // This list is validated by compilation of SafetyCheck.sol. + // Always keep this list and that file in sync. + return !['Initializable'].includes(parent.contract.name); +} + +type SortedFunctions = Record<'code' | 'modifiers' | 'override', ContractFunction[]>; + +// Functions with code first, then those with modifiers, then the rest +function sortedFunctions(contract: Contract): SortedFunctions { + const fns: SortedFunctions = { code: [], modifiers: [], override: [] }; + + for (const fn of contract.functions) { + if (fn.code.length > 0) { + fns.code.push(fn); + } else if (fn.modifiers.length > 0) { + fns.modifiers.push(fn); + } else { + fns.override.push(fn); + } + } + + return fns; +} + +function printParentConstructor({ contract, params }: Parent, helpers: Helpers): [] | [string] { + const useTranspiled = helpers.upgradeable && inferTranspiled(contract); + const fn = useTranspiled ? `__${contract.name}_init` : contract.name; + if (useTranspiled || params.length > 0) { + return [fn + '(' + params.map(printValue).join(', ') + ')']; + } else { + return []; + } +} + +export function printValue(value: Value): string { + if (typeof value === 'object') { + if ('lit' in value) { + return value.lit; + } else if ('note' in value) { + return `${printValue(value.value)} /* ${value.note} */`; + } else { + throw Error('Unknown value type'); + } + } else if (typeof value === 'number') { + if (Number.isSafeInteger(value)) { + return value.toFixed(0); + } else { + throw new Error(`Number not representable (${value})`); + } + } else { + return stringifyUnicodeSafe(value); + } +} + +function printFunction(fn: ContractFunction, helpers: Helpers): Lines[] { + const { transformName } = helpers; + + if (fn.override.size <= 1 && fn.modifiers.length === 0 && fn.code.length === 0 && !fn.final) { + return []; + } + const modifiers: string[] = [fn.kind]; + + if (fn.mutability !== 'nonpayable') { + modifiers.push(fn.mutability); + } + + if (fn.override.size === 1) { + modifiers.push(`override`); + } else if (fn.override.size > 1) { + modifiers.push(`override(${[...fn.override].map(transformName).join(', ')})`); + } + + modifiers.push(...fn.modifiers); + + if (fn.returns?.length) { + modifiers.push(`returns (${fn.returns.join(', ')})`); + } + + const code = [...fn.code]; + + if (fn.override.size > 0 && !fn.final) { + const superCall = `super.${fn.name}(${fn.args.map(a => a.name).join(', ')});`; + code.push(fn.returns?.length ? 'return ' + superCall : superCall); + } + + if (modifiers.length + fn.code.length > 1) { + return printFunction2( + fn.comments, + 'function ' + fn.name, + fn.args.map(a => printArgument(a, helpers)), + modifiers, + code, + ); + } else { + return []; + } +} + +// generic for functions and constructors +// kindedName = 'function foo' or 'constructor' +function printFunction2( + comments: string[], + kindedName: string, + args: string[], + modifiers: string[], + code: Lines[], +): Lines[] { + const fn: Lines[] = [...comments]; + + const headingLength = [kindedName, ...args, ...modifiers].map(s => s.length).reduce((a, b) => a + b); + + const braces = code.length > 0 ? '{' : '{}'; + + if (headingLength <= 72) { + fn.push([`${kindedName}(${args.join(', ')})`, ...modifiers, braces].join(' ')); + } else { + fn.push(`${kindedName}(${args.join(', ')})`, modifiers, braces); + } + + if (code.length > 0) { + fn.push(code, '}'); + } + + return fn; +} + +function printArgument(arg: FunctionArgument, { transformName }: Helpers): string { + let type: string; + if (typeof arg.type === 'string') { + if (/^[A-Z]/.test(arg.type)) { + // eslint-disable-next-line @typescript-eslint/no-unused-expressions + `Type ${arg.type} is not a primitive type. Define it as a ContractReference`; + } + type = arg.type; + } else { + type = transformName(arg.type); + } + + return [type, arg.name].join(' '); +} + +function printNatspecTags(tags: NatspecTag[]): string[] { + return tags.map(({ key, value }) => `/// ${key} ${value}`); +} + +function printImports(imports: ImportContract[], helpers: Helpers): string[] { + // Sort imports by name + imports.sort((a, b) => { + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + return 0; + }); + + const lines: string[] = []; + imports.map(p => { + const importContract = helpers.transformImport(p); + lines.push(`import {${importContract.name}} from "${importContract.path}";`); + }); + + return lines; +} diff --git a/packages/core/confidential/src/scripts/prepare.ts b/packages/core/confidential/src/scripts/prepare.ts new file mode 100644 index 000000000..e65e08d9b --- /dev/null +++ b/packages/core/confidential/src/scripts/prepare.ts @@ -0,0 +1,60 @@ +import { promises as fs } from 'fs'; +import path from 'path'; +import hre from 'hardhat'; +import type { BuildInfo } from 'hardhat/types'; +import { findAll } from 'solidity-ast/utils'; +import { rimraf } from 'rimraf'; +import { version } from '@openzeppelin/contracts/package.json'; + +import type { OpenZeppelinContracts } from '../../openzeppelin-contracts'; +import { writeGeneratedSources } from '../generate/sources'; +import { mapValues } from '../utils/map-values'; +import { transitiveClosure } from '../utils/transitive-closure'; + +async function main() { + const generatedSourcesPath = path.join(hre.config.paths.sources, 'generated'); + await rimraf(generatedSourcesPath); + await writeGeneratedSources(generatedSourcesPath, 'minimal-cover'); + await hre.run('compile'); + + const dependencies: Record> = {}; + const sources: Record = {}; + + for (const buildInfoPath of await hre.artifacts.getBuildInfoPaths()) { + const buildInfo: BuildInfo = JSON.parse(await fs.readFile(buildInfoPath, 'utf8')); + + for (const [sourceFile, { ast }] of Object.entries(buildInfo.output.sources)) { + if ( + sourceFile.startsWith('@openzeppelin/contracts') || + sourceFile.startsWith('@openzeppelin/community-contracts') + ) { + const sourceDependencies = (dependencies[sourceFile] ??= new Set()); + for (const imp of findAll('ImportDirective', ast)) { + sourceDependencies.add(imp.absolutePath); + } + } + } + + for (const [sourceFile, { content }] of Object.entries(buildInfo.input.sources)) { + if ( + sourceFile.startsWith('@openzeppelin/contracts') || + sourceFile.startsWith('@openzeppelin/community-contracts') + ) { + sources[sourceFile] = content; + } + } + } + + const contracts: OpenZeppelinContracts = { + version, + sources, + dependencies: mapValues(transitiveClosure(dependencies), d => Array.from(d)), + }; + + await fs.writeFile('openzeppelin-contracts.json', JSON.stringify(contracts, null, 2)); +} + +main().catch(e => { + console.error(e); + process.exit(1); +}); diff --git a/packages/core/confidential/src/set-access-control.ts b/packages/core/confidential/src/set-access-control.ts new file mode 100644 index 000000000..a4779231d --- /dev/null +++ b/packages/core/confidential/src/set-access-control.ts @@ -0,0 +1,96 @@ +import type { ContractBuilder, BaseFunction } from './contract'; +import { supportsInterface } from './common-functions'; + +export const accessOptions = [false, 'ownable', 'roles', 'managed'] as const; + +export type Access = (typeof accessOptions)[number]; + +/** + * Sets access control for the contract by adding inheritance. + */ +export function setAccessControl(c: ContractBuilder, access: Access) { + switch (access) { + case 'ownable': { + if (c.addParent(parents.Ownable, [{ lit: 'initialOwner' }])) { + c.addConstructorArgument({ + type: 'address', + name: 'initialOwner', + }); + } + break; + } + case 'roles': { + if (c.addParent(parents.AccessControl)) { + c.addConstructorArgument({ + type: 'address', + name: 'defaultAdmin', + }); + c.addConstructorCode('_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);'); + } + c.addOverride(parents.AccessControl, supportsInterface); + break; + } + case 'managed': { + if (c.addParent(parents.AccessManaged, [{ lit: 'initialAuthority' }])) { + c.addConstructorArgument({ + type: 'address', + name: 'initialAuthority', + }); + } + break; + } + } +} + +/** + * Enables access control for the contract and restricts the given function with access control. + */ +export function requireAccessControl( + c: ContractBuilder, + fn: BaseFunction, + access: Access, + roleIdPrefix: string, + roleOwner: string | undefined, +) { + if (access === false) { + access = 'ownable'; + } + + setAccessControl(c, access); + + switch (access) { + case 'ownable': { + c.addModifier('onlyOwner', fn); + break; + } + case 'roles': { + const roleId = roleIdPrefix + '_ROLE'; + const addedConstant = c.addVariable(`bytes32 public constant ${roleId} = keccak256("${roleId}");`); + if (roleOwner && addedConstant) { + c.addConstructorArgument({ type: 'address', name: roleOwner }); + c.addConstructorCode(`_grantRole(${roleId}, ${roleOwner});`); + } + c.addModifier(`onlyRole(${roleId})`, fn); + break; + } + case 'managed': { + c.addModifier('restricted', fn); + break; + } + } +} + +const parents = { + Ownable: { + name: 'Ownable', + path: '@openzeppelin/contracts/access/Ownable.sol', + }, + AccessControl: { + name: 'AccessControl', + path: '@openzeppelin/contracts/access/AccessControl.sol', + }, + AccessManaged: { + name: 'AccessManaged', + path: '@openzeppelin/contracts/access/manager/AccessManaged.sol', + }, +}; diff --git a/packages/core/confidential/src/set-clock-mode.ts b/packages/core/confidential/src/set-clock-mode.ts new file mode 100644 index 000000000..189a952cc --- /dev/null +++ b/packages/core/confidential/src/set-clock-mode.ts @@ -0,0 +1,33 @@ +import type { ContractBuilder, ReferencedContract } from './contract'; +import { defineFunctions } from './utils/define-functions'; + +export const clockModeOptions = ['blocknumber', 'timestamp'] as const; +export const clockModeDefault = 'blocknumber' as const; +export type ClockMode = (typeof clockModeOptions)[number]; + +const functions = defineFunctions({ + clock: { + kind: 'public' as const, + args: [], + returns: ['uint48'], + mutability: 'view' as const, + }, + + CLOCK_MODE: { + kind: 'public' as const, + args: [], + returns: ['string memory'], + mutability: 'pure' as const, + }, +}); + +export function setClockMode(c: ContractBuilder, parent: ReferencedContract, votes: ClockMode) { + if (votes === 'timestamp') { + c.addOverride(parent, functions.clock); + c.setFunctionBody(['return uint48(block.timestamp);'], functions.clock); + + c.setFunctionComments(['// solhint-disable-next-line func-name-mixedcase'], functions.CLOCK_MODE); + c.addOverride(parent, functions.CLOCK_MODE); + c.setFunctionBody(['return "mode=timestamp";'], functions.CLOCK_MODE); + } +} diff --git a/packages/core/confidential/src/set-info.ts b/packages/core/confidential/src/set-info.ts new file mode 100644 index 000000000..61e3713f4 --- /dev/null +++ b/packages/core/confidential/src/set-info.ts @@ -0,0 +1,24 @@ +import type { ContractBuilder } from './contract'; + +export const TAG_SECURITY_CONTACT = `@custom:security-contact`; + +export const infoOptions = [{}, { securityContact: 'security@example.com', license: 'WTFPL' }] as const; + +export const defaults: Info = { license: 'MIT' }; + +export type Info = { + securityContact?: string; + license?: string; +}; + +export function setInfo(c: ContractBuilder, info: Info) { + const { securityContact, license } = info; + + if (securityContact) { + c.addNatspecTag(TAG_SECURITY_CONTACT, securityContact); + } + + if (license) { + c.license = license; + } +} diff --git a/packages/core/confidential/src/set-upgradeable.ts b/packages/core/confidential/src/set-upgradeable.ts new file mode 100644 index 000000000..bdd72198d --- /dev/null +++ b/packages/core/confidential/src/set-upgradeable.ts @@ -0,0 +1,66 @@ +import type { ContractBuilder } from './contract'; +import type { Access } from './set-access-control'; +import { requireAccessControl } from './set-access-control'; +import { defineFunctions } from './utils/define-functions'; + +export const upgradeableOptions = [false, 'transparent', 'uups'] as const; + +export type Upgradeable = (typeof upgradeableOptions)[number]; + +function setUpgradeableBase( + c: ContractBuilder, + upgradeable: Upgradeable, + restrictAuthorizeUpgradeWhenUUPS: () => void, +) { + if (upgradeable === false) { + return; + } + + c.upgradeable = true; + + c.addParent({ + name: 'Initializable', + path: '@openzeppelin/contracts/proxy/utils/Initializable.sol', + }); + + switch (upgradeable) { + case 'transparent': + break; + + case 'uups': { + restrictAuthorizeUpgradeWhenUUPS(); + const UUPSUpgradeable = { + name: 'UUPSUpgradeable', + path: '@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol', + }; + c.addParent(UUPSUpgradeable); + c.addOverride(UUPSUpgradeable, functions._authorizeUpgrade); + c.setFunctionBody([], functions._authorizeUpgrade); + break; + } + + default: { + const _: never = upgradeable; + throw new Error('Unknown value for `upgradeable`'); + } + } +} + +export function setUpgradeable(c: ContractBuilder, upgradeable: Upgradeable, access: Access) { + setUpgradeableBase(c, upgradeable, () => { + requireAccessControl(c, functions._authorizeUpgrade, access, 'UPGRADER', 'upgrader'); + }); +} + +export function setUpgradeableGovernor(c: ContractBuilder, upgradeable: Upgradeable) { + setUpgradeableBase(c, upgradeable, () => { + c.addModifier('onlyGovernance', functions._authorizeUpgrade); + }); +} + +const functions = defineFunctions({ + _authorizeUpgrade: { + args: [{ name: 'newImplementation', type: 'address' }], + kind: 'internal', + }, +}); diff --git a/packages/core/confidential/src/signer.ts b/packages/core/confidential/src/signer.ts new file mode 100644 index 000000000..09e2cd111 --- /dev/null +++ b/packages/core/confidential/src/signer.ts @@ -0,0 +1,119 @@ +import type { ContractBuilder } from './contract'; +import { defineFunctions } from './utils/define-functions'; + +export const SignerOptions = [false, 'ERC7702', 'ECDSA', 'P256', 'RSA', 'Multisig', 'MultisigWeighted'] as const; +export type SignerOptions = (typeof SignerOptions)[number]; + +export function addSigner(c: ContractBuilder, signer: SignerOptions): void { + if (!signer) return; + + c.addParent(signers[signer]); + c.addOverride( + { name: signer === 'MultisigWeighted' ? signers.Multisig.name : signers[signer].name }, + signerFunctions._rawSignatureValidation, + ); + + // ERC-7702 doesn't require initialization + if (signer === 'ERC7702') return; + + c.addParent({ + name: 'Initializable', + path: '@openzeppelin/contracts/proxy/utils/Initializable.sol', + }); + + // Add locking constructor + c.addNatspecTag('@custom:oz-upgrades-unsafe-allow', 'constructor'); + c.addConstructorCode(`_disableInitializers();`); + + // Add initializer + const fn = signerFunctions[`initialize${signer}`]; + c.addModifier('initializer', fn); + + switch (signer) { + case 'Multisig': + c.addFunctionCode(`_addSigners(${fn.args[0]!.name});`, fn); + c.addFunctionCode(`_setThreshold(${fn.args[1]!.name});`, fn); + break; + case 'MultisigWeighted': + c.addFunctionCode(`_addSigners(${fn.args[0]!.name});`, fn); + c.addFunctionCode(`_setSignerWeights(${fn.args[0]!.name}, ${fn.args[1]!.name});`, fn); + c.addFunctionCode(`_setThreshold(${fn.args[2]!.name});`, fn); + break; + case 'ECDSA': + case 'P256': + case 'RSA': + c.addFunctionCode(`_setSigner(${fn.args.map(({ name }) => name).join(', ')});`, fn); + } +} + +export const signers = { + ERC7702: { + name: 'SignerERC7702', + path: '@openzeppelin/community-contracts/utils/cryptography/SignerERC7702.sol', + }, + ECDSA: { + name: 'SignerECDSA', + path: '@openzeppelin/community-contracts/utils/cryptography/SignerECDSA.sol', + }, + P256: { + name: 'SignerP256', + path: '@openzeppelin/community-contracts/utils/cryptography/SignerP256.sol', + }, + RSA: { + name: 'SignerRSA', + path: '@openzeppelin/community-contracts/utils/cryptography/SignerRSA.sol', + }, + Multisig: { + name: 'MultiSignerERC7913', + path: '@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913.sol', + }, + MultisigWeighted: { + name: 'MultiSignerERC7913Weighted', + path: '@openzeppelin/community-contracts/utils/cryptography/MultiSignerERC7913Weighted.sol', + }, +}; + +export const signerFunctions = defineFunctions({ + initializeECDSA: { + kind: 'public' as const, + args: [{ name: 'signer', type: 'address' }], + }, + initializeP256: { + kind: 'public' as const, + args: [ + { name: 'qx', type: 'bytes32' }, + { name: 'qy', type: 'bytes32' }, + ], + }, + initializeRSA: { + kind: 'public' as const, + args: [ + { name: 'e', type: 'bytes memory' }, + { name: 'n', type: 'bytes memory' }, + ], + }, + initializeMultisig: { + kind: 'public' as const, + args: [ + { name: 'signers', type: 'bytes[] memory' }, + { name: 'threshold', type: 'uint256' }, + ], + }, + initializeMultisigWeighted: { + kind: 'public' as const, + args: [ + { name: 'signers', type: 'bytes[] memory' }, + { name: 'weights', type: 'uint256[] memory' }, + { name: 'threshold', type: 'uint256' }, + ], + }, + _rawSignatureValidation: { + kind: 'internal' as const, + args: [ + { name: 'hash', type: 'bytes32' }, + { name: 'signature', type: 'bytes calldata' }, + ], + returns: ['bool'], + mutability: 'view' as const, + }, +}); diff --git a/packages/core/confidential/src/solidity-version.json b/packages/core/confidential/src/solidity-version.json new file mode 100644 index 000000000..12b321f91 --- /dev/null +++ b/packages/core/confidential/src/solidity-version.json @@ -0,0 +1 @@ +"0.8.27" diff --git a/packages/core/confidential/src/stablecoin.test.ts b/packages/core/confidential/src/stablecoin.test.ts new file mode 100644 index 000000000..941efaa10 --- /dev/null +++ b/packages/core/confidential/src/stablecoin.test.ts @@ -0,0 +1,169 @@ +import test from 'ava'; +import { stablecoin } from '.'; + +import type { StablecoinOptions } from './stablecoin'; +import { buildStablecoin } from './stablecoin'; +import { printContract } from './print'; + +function testStablecoin(title: string, opts: Partial) { + test(title, t => { + const c = buildStablecoin({ + name: 'MyStablecoin', + symbol: 'MST', + ...opts, + }); + t.snapshot(printContract(c)); + }); +} + +/** + * Tests external API for equivalence with internal API + */ +function testAPIEquivalence(title: string, opts?: StablecoinOptions) { + test(title, t => { + t.is( + stablecoin.print(opts), + printContract( + buildStablecoin({ + name: 'MyStablecoin', + symbol: 'MST', + ...opts, + }), + ), + ); + }); +} + +testStablecoin('basic stablecoin', {}); + +testStablecoin('stablecoin burnable', { + burnable: true, +}); + +testStablecoin('stablecoin pausable', { + pausable: true, + access: 'ownable', +}); + +testStablecoin('stablecoin pausable with roles', { + pausable: true, + access: 'roles', +}); + +testStablecoin('stablecoin pausable with managed', { + pausable: true, + access: 'managed', +}); + +testStablecoin('stablecoin burnable pausable', { + burnable: true, + pausable: true, +}); + +testStablecoin('stablecoin preminted', { + premint: '1000', +}); + +testStablecoin('stablecoin premint of 0', { + premint: '0', +}); + +testStablecoin('stablecoin mintable', { + mintable: true, + access: 'ownable', +}); + +testStablecoin('stablecoin mintable with roles', { + mintable: true, + access: 'roles', +}); + +testStablecoin('stablecoin callback', { + callback: true, +}); + +testStablecoin('stablecoin permit', { + permit: true, +}); + +testStablecoin('stablecoin custodian', { + custodian: true, +}); + +testStablecoin('stablecoin allowlist', { + limitations: 'allowlist', +}); + +testStablecoin('stablecoin blocklist', { + limitations: 'blocklist', +}); + +testStablecoin('stablecoin votes', { + votes: true, +}); + +testStablecoin('stablecoin votes + blocknumber', { + votes: 'blocknumber', +}); + +testStablecoin('stablecoin votes + timestamp', { + votes: 'timestamp', +}); + +testStablecoin('stablecoin flashmint', { + flashmint: true, +}); + +testStablecoin('stablecoin full', { + name: 'MyStablecoin', + symbol: 'MST', + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + callback: true, + permit: true, + votes: true, + flashmint: true, + crossChainBridging: 'custom', + premintChainId: '10', + limitations: 'allowlist', + custodian: true, +}); + +testAPIEquivalence('stablecoin API default'); + +testAPIEquivalence('stablecoin API basic', { + name: 'CustomStablecoin', + symbol: 'CST', +}); + +testAPIEquivalence('stablecoin API full', { + name: 'CustomStablecoin', + symbol: 'CST', + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + callback: true, + permit: true, + votes: true, + flashmint: true, + crossChainBridging: 'custom', + premintChainId: '10', + limitations: 'allowlist', + custodian: true, +}); + +test('stablecoin API assert defaults', async t => { + t.is(stablecoin.print(stablecoin.defaults), stablecoin.print()); +}); + +test('stablecoin API isAccessControlRequired', async t => { + t.is(stablecoin.isAccessControlRequired({ mintable: true }), true); + t.is(stablecoin.isAccessControlRequired({ pausable: true }), true); + t.is(stablecoin.isAccessControlRequired({ limitations: 'allowlist' }), true); + t.is(stablecoin.isAccessControlRequired({ limitations: 'blocklist' }), true); +}); diff --git a/packages/core/confidential/src/stablecoin.test.ts.md b/packages/core/confidential/src/stablecoin.test.ts.md new file mode 100644 index 000000000..9e9522d18 --- /dev/null +++ b/packages/core/confidential/src/stablecoin.test.ts.md @@ -0,0 +1,692 @@ +# Snapshot report for `src/stablecoin.test.ts` + +The actual snapshot is saved in `stablecoin.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## basic stablecoin + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + }␊ + ` + +## stablecoin burnable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Burnable, ERC20Permit {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + }␊ + ` + +## stablecoin pausable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Pausable, Ownable, ERC20Permit {␊ + constructor(address initialOwner)␊ + ERC20("MyStablecoin", "MST")␊ + Ownable(initialOwner)␊ + ERC20Permit("MyStablecoin")␊ + {}␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## stablecoin pausable with roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Pausable, AccessControl, ERC20Permit {␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + ␊ + constructor(address defaultAdmin, address pauser)␊ + ERC20("MyStablecoin", "MST")␊ + ERC20Permit("MyStablecoin")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## stablecoin pausable with managed + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Pausable, AccessManaged, ERC20Permit {␊ + constructor(address initialAuthority)␊ + ERC20("MyStablecoin", "MST")␊ + AccessManaged(initialAuthority)␊ + ERC20Permit("MyStablecoin")␊ + {}␊ + ␊ + function pause() public restricted {␊ + _pause();␊ + }␊ + ␊ + function unpause() public restricted {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## stablecoin burnable pausable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Burnable, ERC20Pausable, Ownable, ERC20Permit {␊ + constructor(address initialOwner)␊ + ERC20("MyStablecoin", "MST")␊ + Ownable(initialOwner)␊ + ERC20Permit("MyStablecoin")␊ + {}␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## stablecoin preminted + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit {␊ + constructor(address recipient)␊ + ERC20("MyStablecoin", "MST")␊ + ERC20Permit("MyStablecoin")␊ + {␊ + _mint(recipient, 1000 * 10 ** decimals());␊ + }␊ + }␊ + ` + +## stablecoin premint of 0 + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + }␊ + ` + +## stablecoin mintable + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyStablecoin is ERC20, Ownable, ERC20Permit {␊ + constructor(address initialOwner)␊ + ERC20("MyStablecoin", "MST")␊ + Ownable(initialOwner)␊ + ERC20Permit("MyStablecoin")␊ + {}␊ + ␊ + function mint(address to, uint256 amount) public onlyOwner {␊ + _mint(to, amount);␊ + }␊ + }␊ + ` + +## stablecoin mintable with roles + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, AccessControl, ERC20Permit {␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + constructor(address defaultAdmin, address minter)␊ + ERC20("MyStablecoin", "MST")␊ + ERC20Permit("MyStablecoin")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + }␊ + ` + +## stablecoin callback + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC1363, ERC20Permit {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + }␊ + ` + +## stablecoin permit + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + }␊ + ` + +## stablecoin custodian + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Custodian} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit, ERC20Custodian, Ownable {␊ + constructor(address initialOwner)␊ + ERC20("MyStablecoin", "MST")␊ + ERC20Permit("MyStablecoin")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function _isCustodian(address user) internal view override returns (bool) {␊ + return user == owner();␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Custodian)␊ + {␊ + super._update(from, to, value);␊ + }␊ + }␊ + ` + +## stablecoin allowlist + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Allowlist} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit, ERC20Allowlist, Ownable {␊ + constructor(address initialOwner)␊ + ERC20("MyStablecoin", "MST")␊ + ERC20Permit("MyStablecoin")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function allowUser(address user) public onlyOwner {␊ + _allowUser(user);␊ + }␊ + ␊ + function disallowUser(address user) public onlyOwner {␊ + _disallowUser(user);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Allowlist)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function _approve(address owner, address spender, uint256 value, bool emitEvent)␊ + internal␊ + override(ERC20, ERC20Allowlist)␊ + {␊ + super._approve(owner, spender, value, emitEvent);␊ + }␊ + }␊ + ` + +## stablecoin blocklist + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Blocklist} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Blocklist.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit, ERC20Blocklist, Ownable {␊ + constructor(address initialOwner)␊ + ERC20("MyStablecoin", "MST")␊ + ERC20Permit("MyStablecoin")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function blockUser(address user) public onlyOwner {␊ + _blockUser(user);␊ + }␊ + ␊ + function unblockUser(address user) public onlyOwner {␊ + _unblockUser(user);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Blocklist)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function _approve(address owner, address spender, uint256 value, bool emitEvent)␊ + internal␊ + override(ERC20, ERC20Blocklist)␊ + {␊ + super._approve(owner, spender, value, emitEvent);␊ + }␊ + }␊ + ` + +## stablecoin votes + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## stablecoin votes + blocknumber + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## stablecoin votes + timestamp + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit, ERC20Votes {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + ␊ + function clock() public view override returns (uint48) {␊ + return uint48(block.timestamp);␊ + }␊ + ␊ + // solhint-disable-next-line func-name-mixedcase␊ + function CLOCK_MODE() public pure override returns (string memory) {␊ + return "mode=timestamp";␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` + +## stablecoin flashmint + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Permit, ERC20FlashMint {␊ + constructor() ERC20("MyStablecoin", "MST") ERC20Permit("MyStablecoin") {}␊ + }␊ + ` + +## stablecoin full + +> Snapshot 1 + + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0 and Community Contracts commit de17c8e␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC1363} from "@openzeppelin/contracts/token/ERC20/extensions/ERC1363.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Allowlist} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Allowlist.sol";␊ + import {ERC20Bridgeable} from "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20Custodian} from "@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Custodian.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyStablecoin is ERC20, ERC20Bridgeable, AccessControl, ERC20Burnable, ERC20Pausable, ERC1363, ERC20Permit, ERC20Votes, ERC20FlashMint, ERC20Custodian, ERC20Allowlist {␊ + bytes32 public constant TOKEN_BRIDGE_ROLE = keccak256("TOKEN_BRIDGE_ROLE");␊ + error Unauthorized();␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + bytes32 public constant CUSTODIAN_ROLE = keccak256("CUSTODIAN_ROLE");␊ + bytes32 public constant LIMITER_ROLE = keccak256("LIMITER_ROLE");␊ + ␊ + constructor(address defaultAdmin, address tokenBridge, address recipient, address pauser, address minter, address custodian, address limiter)␊ + ERC20("MyStablecoin", "MST")␊ + ERC20Permit("MyStablecoin")␊ + {␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(TOKEN_BRIDGE_ROLE, tokenBridge);␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + _grantRole(CUSTODIAN_ROLE, custodian);␊ + _grantRole(LIMITER_ROLE, limiter);␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (!hasRole(TOKEN_BRIDGE_ROLE, caller)) revert Unauthorized();␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _isCustodian(address user) internal view override returns (bool) {␊ + return hasRole(CUSTODIAN_ROLE, user);␊ + }␊ + ␊ + function allowUser(address user) public onlyRole(LIMITER_ROLE) {␊ + _allowUser(user);␊ + }␊ + ␊ + function disallowUser(address user) public onlyRole(LIMITER_ROLE) {␊ + _disallowUser(user);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable, ERC20Votes, ERC20Custodian, ERC20Allowlist)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function _approve(address owner, address spender, uint256 value, bool emitEvent)␊ + internal␊ + override(ERC20, ERC20Allowlist)␊ + {␊ + super._approve(owner, spender, value, emitEvent);␊ + }␊ + ␊ + function supportsInterface(bytes4 interfaceId)␊ + public␊ + view␊ + override(ERC20Bridgeable, AccessControl, ERC1363)␊ + returns (bool)␊ + {␊ + return super.supportsInterface(interfaceId);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + ` diff --git a/packages/core/confidential/src/stablecoin.test.ts.snap b/packages/core/confidential/src/stablecoin.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..af29ad69c4b605eade0753ac2ead60f3f64bc178 GIT binary patch literal 2127 zcmV-V2(b4-RzV|;?u6RoLW754WB`6&9NGp~?* zie9J^lOKx+00000000B+T+MGIH5=bgA);48+z~Q4CHp2#+Wpj)ef4(Rf}(BORX-4L zpmJuM#_EhcYkS%))k<*Y!hsVv_-D9r^R7xm|#wz$9q)puYa&@DBx!|zrTIs ztsBAL&AT_=z4gt_Mg#1;T>G@Xfh|Nhs<&)J1ny$Qo`QC3x728WRqA?B;Esd9F%~_r zSLx$tCR>G5)@gk6s^0Z!Mq zSC^V^K$lS$l>bjXM81sB8di+f5cCj{hO8R?yTGYaUe-ZgBIaT-3>11T5aE~--bf)t z*rm7)XrJt;Nd%Y!S+@pKO~7dh001mXxM02|D63S%@=7_~x?BV0_Rem(nr@t_QU#}P zN^eS$7I~sS(D4}w9{Lq|>upVue-~Sk&!cgUqska#W(*}3=o0M4gFZLg&7F5OySa6z z(021O8s}J=jWDKQH!=3s@wu!WS{CBG5!D`!q@qF9K-BsyBZRii5a$3BEHHGojtOE_ zSu6OZy_gVK!q~=k!fU{@?Y9B`^(b7*(pk^E(c<042_egp7m_{`R9f%koVY zz$fQ{P_;CWMg#2j5a?3Jp~sjUC{zw0Lx3J3#;}bzVCa>P8L~m=1nfj6zmO4R-}h`N zkecH_>opKR30ea_CSvK~BX9&AA0=~!i9n1%N4<#qt(bHj&7-Q!eGjpPxbv{nptG=( zc({r`UcYZ3kZ{2>>L705l3z3~`ROvaWJRtK*^oNtTu@pY)3U#g+%zn&Xp?ASm(Gbm z{QgqB_$1jtBEZX)y`A;#{q3!db?^)vBFln@OAjAa%Bg~Kb-6T3;vvLO57;YFtTrg}2WRFfkW{f%S#JuyKAp($hr29(aoL9v@(p`8cpjg~9 zy(42bTrodE&QFlT5tm5&OANU|=LR3?=3g3L{a)uP;W)` zQv-|5W)s{4i%oFv9GRBR6f!lsS}d&D_Z?>4WudD>t-cF@B0NubB1*rIMQ0XABE zY&}6!RrqQ=AA`^$Y3t|HzJj|dK5VMn=s^upIk*?&)1I|M=li{VKJ7l{N^&Khyb)9Z z8*qftv5M9JhJ?=u2bB(`PI`L{3uI&P>=~dzuLX`oscD&DC<+GSb}%<=77C3FVxb~oln_zpNx!+|D>KvwknanP zd_TMv&;wqd=!y6`OjMJrtLE&l(#R_(yB%g9XkUKE* z2Tx34Zdp)~``CiA+PCP)fWC(uQ87r#cf1v%0MT;14O zeX-x(T3b(~^!yZaB~k`S?BoEr$ffMWAZ*#CHhQL{EEo2~bsc#!9mDE6koST#218=o ze>8ghr`R{n9|Z$#V=@*)Dv%kw(~cgLco%oaP1CmHJ5ImZyz{qaHh;V`yP?ku$Tgec z9GYp~jXh`BK0sr9i()g_74;0(WqeaJ&BTQ%a8xnB5Gt$_n%J&6pL5`cNu~s}w9ArZ z{Qjg7eUYA#GP=9=*FM0T8@G43bwc^KzS zaLvP5-P_sST5GLr8esIYvye7g?Uq@bbjb(_x6+nF3rb$5zDm)59w3{jn><^IQN*tt z?BbbD=Iyh%T6#KCZEzPvXC|u$F~N3_Dzw;4pILzElb)sAPkKU+*&x^8pE>~N%|^~t z)Qzo{XvhTUo=(xpzHB#!H{^RWB&DCcmRAlxL%D_WHIya2qe~z3{|Sa`ZuQ z-wPZ%-U@{2LJL*ocKslfE_l(hM+wK|J8*%EW(d*9g_#$h>6bPwW^n^d{{jzozQeXt F000Z${v7}S literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/stablecoin.ts b/packages/core/confidential/src/stablecoin.ts new file mode 100644 index 000000000..8d1134989 --- /dev/null +++ b/packages/core/confidential/src/stablecoin.ts @@ -0,0 +1,163 @@ +import type { Contract, ContractBuilder } from './contract'; +import type { Access } from './set-access-control'; +import { setAccessControl, requireAccessControl } from './set-access-control'; +import { defineFunctions } from './utils/define-functions'; +import { printContract } from './print'; +import type { ERC20Options } from './erc20'; +import { + buildERC20, + defaults as erc20defaults, + withDefaults as withERC20Defaults, + functions as erc20functions, +} from './erc20'; + +export interface StablecoinOptions extends ERC20Options { + limitations?: false | 'allowlist' | 'blocklist'; + custodian?: boolean; +} + +export const defaults: Required = { + ...erc20defaults, + name: 'MyStablecoin', + symbol: 'MST', + limitations: false, + custodian: false, +} as const; + +function withDefaults(opts: StablecoinOptions): Required { + return { + ...withERC20Defaults(opts), + name: opts.name ?? defaults.name, + symbol: opts.symbol ?? defaults.symbol, + limitations: opts.limitations ?? defaults.limitations, + custodian: opts.custodian ?? defaults.custodian, + }; +} + +export function printStablecoin(opts: StablecoinOptions = defaults): string { + return printContract(buildStablecoin(opts)); +} + +export function isAccessControlRequired(opts: Partial): boolean { + return opts.mintable || opts.limitations !== false || opts.custodian || opts.pausable || opts.upgradeable === 'uups'; +} + +export function buildStablecoin(opts: StablecoinOptions): Contract { + const allOpts = withDefaults(opts); + + // Upgradeability is not yet available for the community contracts + allOpts.upgradeable = false; + + const c = buildERC20(allOpts); + + if (allOpts.custodian) { + addCustodian(c, allOpts.access); + } + + if (allOpts.limitations) { + addLimitations(c, allOpts.access, allOpts.limitations); + } + + return c; +} + +function addLimitations(c: ContractBuilder, access: Access, mode: boolean | 'allowlist' | 'blocklist') { + const type = mode === 'allowlist'; + const ERC20Limitation = { + name: type ? 'ERC20Allowlist' : 'ERC20Blocklist', + path: `@openzeppelin/community-contracts/token/ERC20/extensions/${type ? 'ERC20Allowlist' : 'ERC20Blocklist'}.sol`, + }; + + c.addParent(ERC20Limitation); + c.addOverride(ERC20Limitation, functions._update); + c.addOverride(ERC20Limitation, functions._approve); + + const [addFn, removeFn] = type + ? [functions.allowUser, functions.disallowUser] + : [functions.blockUser, functions.unblockUser]; + + requireAccessControl(c, addFn, access, 'LIMITER', 'limiter'); + c.addFunctionCode(`_${type ? 'allowUser' : 'blockUser'}(user);`, addFn); + + requireAccessControl(c, removeFn, access, 'LIMITER', 'limiter'); + c.addFunctionCode(`_${type ? 'disallowUser' : 'unblockUser'}(user);`, removeFn); +} + +function addCustodian(c: ContractBuilder, access: Access) { + const ERC20Custodian = { + name: 'ERC20Custodian', + path: '@openzeppelin/community-contracts/token/ERC20/extensions/ERC20Custodian.sol', + }; + + c.addParent(ERC20Custodian); + c.addOverride(ERC20Custodian, functions._update); + c.addOverride(ERC20Custodian, functions._isCustodian); + + if (access === false) { + access = 'ownable'; + } + + setAccessControl(c, access); + + switch (access) { + case 'ownable': { + c.setFunctionBody([`return user == owner();`], functions._isCustodian); + break; + } + case 'roles': { + const roleOwner = 'custodian'; + const roleId = 'CUSTODIAN_ROLE'; + const addedConstant = c.addVariable(`bytes32 public constant ${roleId} = keccak256("${roleId}");`); + if (roleOwner && addedConstant) { + c.addConstructorArgument({ type: 'address', name: roleOwner }); + c.addConstructorCode(`_grantRole(${roleId}, ${roleOwner});`); + } + c.setFunctionBody([`return hasRole(CUSTODIAN_ROLE, user);`], functions._isCustodian); + break; + } + case 'managed': { + c.addImportOnly({ + name: 'AuthorityUtils', + path: `@openzeppelin/contracts/access/manager/AuthorityUtils.sol`, + }); + const logic = [ + `(bool immediate,) = AuthorityUtils.canCallWithDelay(authority(), user, address(this), bytes4(_msgData()[0:4]));`, + `return immediate;`, + ]; + c.setFunctionBody(logic, functions._isCustodian); + break; + } + } +} + +const functions = { + ...erc20functions, + ...defineFunctions({ + _isCustodian: { + kind: 'internal' as const, + args: [{ name: 'user', type: 'address' }], + returns: ['bool'], + mutability: 'view' as const, + }, + + allowUser: { + kind: 'public' as const, + args: [{ name: 'user', type: 'address' }], + }, + + disallowUser: { + kind: 'public' as const, + args: [{ name: 'user', type: 'address' }], + }, + + blockUser: { + kind: 'public' as const, + args: [{ name: 'user', type: 'address' }], + }, + + unblockUser: { + kind: 'public' as const, + args: [{ name: 'user', type: 'address' }], + }, + }), +}; diff --git a/packages/core/confidential/src/test.ts b/packages/core/confidential/src/test.ts new file mode 100644 index 000000000..34370cfd8 --- /dev/null +++ b/packages/core/confidential/src/test.ts @@ -0,0 +1,102 @@ +import { promises as fs } from 'fs'; +import type { TestFn, ExecutionContext } from 'ava'; +import _test from 'ava'; +import hre from 'hardhat'; +import path from 'path'; + +import { generateSources, writeGeneratedSources } from './generate/sources'; +import type { GenericOptions, KindedOptions } from './build-generic'; +import { custom, erc1155, stablecoin, erc20, erc721, governor } from './api'; + +interface Context { + generatedSourcesPath: string; +} + +const test = _test as TestFn; + +test.serial('erc20 result compiles', async t => { + await testCompile(t, 'ERC20'); +}); + +test.serial('erc721 result compiles', async t => { + await testCompile(t, 'ERC721'); +}); + +test.serial('erc1155 result compiles', async t => { + await testCompile(t, 'ERC1155'); +}); + +test.serial('stablecoin result compiles', async t => { + await testCompile(t, 'Stablecoin'); +}); + +test.serial('account result compiles', async t => { + await testCompile(t, 'Account'); +}); + +test.serial('governor result compiles', async t => { + await testCompile(t, 'Governor'); +}); + +test.serial('custom result compiles', async t => { + await testCompile(t, 'Custom'); +}); + +async function testCompile(t: ExecutionContext, kind: keyof KindedOptions) { + const generatedSourcesPath = path.join(hre.config.paths.sources, `generated`); + await fs.rm(generatedSourcesPath, { force: true, recursive: true }); + await writeGeneratedSources(generatedSourcesPath, 'all', kind); + + // We only want to check that contracts compile and we don't care about any + // of the outputs. Setting empty outputSelection causes compilation to go a + // lot faster and not run out of memory. + for (const { settings } of hre.config.solidity.compilers) { + settings.outputSelection = {}; + } + + await hre.run('compile'); + t.pass(); +} + +function isAccessControlRequired(opts: GenericOptions) { + switch (opts.kind) { + case 'ERC20': + return erc20.isAccessControlRequired(opts); + case 'ERC721': + return erc721.isAccessControlRequired(opts); + case 'ERC1155': + return erc1155.isAccessControlRequired(opts); + case 'Stablecoin': + return stablecoin.isAccessControlRequired(opts); + case 'RealWorldAsset': + return stablecoin.isAccessControlRequired(opts); + case 'Account': + throw new Error(`Not applicable for ${opts.kind}`); + case 'Governor': + return governor.isAccessControlRequired(opts); + case 'Custom': + return custom.isAccessControlRequired(opts); + default: + throw new Error('No such kind'); + } +} + +test('is access control required', async t => { + for (const contract of generateSources('all')) { + const regexOwnable = /import.*Ownable(Upgradeable)?.sol.*/gm; + + switch (contract.options.kind) { + case 'Account': + break; + default: { + if (!contract.options.access) { + if (isAccessControlRequired(contract.options)) { + t.regex(contract.source, regexOwnable, JSON.stringify(contract.options)); + } else { + t.notRegex(contract.source, regexOwnable, JSON.stringify(contract.options)); + } + } + } + } + } +}); diff --git a/packages/core/confidential/src/utils/community-contracts-git-commit.test.ts b/packages/core/confidential/src/utils/community-contracts-git-commit.test.ts new file mode 100644 index 000000000..76c220fb1 --- /dev/null +++ b/packages/core/confidential/src/utils/community-contracts-git-commit.test.ts @@ -0,0 +1,115 @@ +import test from 'ava'; + +import { extractGitCommitHash } from './community-contracts-git-commit'; + +// Valid cases + +test('extractGitCommitHash - lowercase 40-char hash', t => { + const hash = extractGitCommitHash( + '@openzeppelin/community-contracts', + 'git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#0123456789abcdef0123456789abcdef01234567', + ); + t.is(hash, '0123456789abcdef0123456789abcdef01234567'); +}); + +test('extractGitCommitHash - uppercase 7-char hash returns lowercase', t => { + const hash = extractGitCommitHash( + '@openzeppelin/community-contracts', + 'git+ssh://git@github.com/OpenZeppelin/openzeppelin-community-contracts.git#ABCDEF1', + ); + t.is(hash, 'abcdef1'); +}); + +// Invalid format cases + +test('extractGitCommitHash - missing git+ prefix', t => { + const err = t.throws(() => + extractGitCommitHash( + '@openzeppelin/community-contracts', + 'https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#abcdef1', + ), + ); + t.true( + err instanceof Error && + err.message.includes( + 'Expected package dependency for @openzeppelin/community-contracts in format git+#,', + ), + ); +}); + +test('extractGitCommitHash - missing #', t => { + const err = t.throws(() => + extractGitCommitHash( + '@openzeppelin/community-contracts', + 'git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git', + ), + ); + t.true( + err instanceof Error && + err.message.includes( + 'Expected package dependency for @openzeppelin/community-contracts in format git+#,', + ), + ); +}); + +test('extractGitCommitHash - multiple # parts', t => { + const err = t.throws(() => + extractGitCommitHash( + '@openzeppelin/community-contracts', + 'git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#abcdef1#extra', + ), + ); + t.true( + err instanceof Error && + err.message.includes( + 'Expected package dependency for @openzeppelin/community-contracts in format git+#,', + ), + ); +}); + +// Invalid hash content cases + +test('extractGitCommitHash - too short hash', t => { + const err = t.throws(() => + extractGitCommitHash( + '@openzeppelin/community-contracts', + 'git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#abcde', + ), + ); + t.true( + err instanceof Error && + err.message.includes( + 'Expected git commit hash for package dependency @openzeppelin/community-contracts to have between 7 and 40 hex chars', + ), + ); +}); + +test('extractGitCommitHash - too long hash', t => { + const err = t.throws(() => + extractGitCommitHash( + '@openzeppelin/community-contracts', + 'git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#0123456789abcdef0123456789abcdef012345678', + ), + ); + t.true( + err instanceof Error && + err.message.includes( + 'Expected git commit hash for package dependency @openzeppelin/community-contracts to have between 7 and 40 hex chars', + ), + ); +}); + +test('extractGitCommitHash - non-hex characters', t => { + const err = t.throws(() => + extractGitCommitHash( + '@openzeppelin/community-contracts', + 'git+https://github.com/OpenZeppelin/openzeppelin-community-contracts.git#abcdefg', + ), + ); + t.true( + err instanceof Error && + err.message.includes( + 'Expected git commit hash for package dependency @openzeppelin/community-contracts to have between 7 and 40 hex chars', + ), + ); +}); diff --git a/packages/core/confidential/src/utils/community-contracts-git-commit.ts b/packages/core/confidential/src/utils/community-contracts-git-commit.ts new file mode 100644 index 000000000..2f168a124 --- /dev/null +++ b/packages/core/confidential/src/utils/community-contracts-git-commit.ts @@ -0,0 +1,38 @@ +import { devDependencies } from '../../package.json'; + +/** + * @returns The git commit hash of the @openzeppelin/community-contracts package dependency. + * @throws Error if the @openzeppelin/community-contracts package dependency is not found in devDependencies. + */ +export function getCommunityContractsGitCommit(): string { + const communityContractsVersion = devDependencies['@openzeppelin/community-contracts']; + if (!communityContractsVersion) { + throw new Error('@openzeppelin/community-contracts not found in devDependencies'); + } + return extractGitCommitHash('@openzeppelin/community-contracts', communityContractsVersion); +} + +/** + * Extracts the git commit hash from a package dependency version string. + * The expected format is `git+#`. + * + * @param dependencyName The name of the package dependency. + * @param dependencyVersion The version string of the package dependency. + * @returns The git commit hash, normalized to lowercase. + * @throws Error if the version string or commit hash is not in the expected format. + */ +export function extractGitCommitHash(dependencyName: string, dependencyVersion: string): string { + const split = dependencyVersion.split('#'); + if (!dependencyVersion.startsWith('git+') || split.length !== 2) { + throw new Error( + `Expected package dependency for ${dependencyName} in format git+#, but got ${dependencyVersion}`, + ); + } + const hash = split[1]!; + if (!/^[a-fA-F0-9]{7,40}$/.test(hash)) { + throw new Error( + `Expected git commit hash for package dependency ${dependencyName} to have between 7 and 40 hex chars, but got ${hash}`, + ); + } + return hash.toLowerCase(); +} diff --git a/packages/core/confidential/src/utils/convert-strings.test.ts b/packages/core/confidential/src/utils/convert-strings.test.ts new file mode 100644 index 000000000..241589949 --- /dev/null +++ b/packages/core/confidential/src/utils/convert-strings.test.ts @@ -0,0 +1,23 @@ +import test from 'ava'; + +import { toUint256, UINT256_MAX } from './convert-strings'; +import { OptionsError } from '../error'; + +test('toUint256', t => { + t.is(toUint256('123', 'foo'), BigInt(123)); +}); + +test('toUint256 - not number', t => { + const error = t.throws(() => toUint256('abc', 'foo'), { instanceOf: OptionsError }); + t.is(error.messages.foo, 'Not a valid number'); +}); + +test('toUint256 - negative', t => { + const error = t.throws(() => toUint256('-1', 'foo'), { instanceOf: OptionsError }); + t.is(error.messages.foo, 'Not a valid number'); +}); + +test('toUint256 - too large', t => { + const error = t.throws(() => toUint256(String(UINT256_MAX + BigInt(1)), 'foo'), { instanceOf: OptionsError }); + t.is(error.messages.foo, 'Value is greater than uint256 max value'); +}); diff --git a/packages/core/confidential/src/utils/convert-strings.ts b/packages/core/confidential/src/utils/convert-strings.ts new file mode 100644 index 000000000..04d03329c --- /dev/null +++ b/packages/core/confidential/src/utils/convert-strings.ts @@ -0,0 +1,27 @@ +import { OptionsError } from '../error'; + +export const UINT256_MAX = BigInt(2) ** BigInt(256) - BigInt(1); + +/** + * Checks that a string is a valid `uint256` value and converts it to bigint. + * + * @param value The value to check. + * @param field The field name to use in the error if the value is invalid. + * @throws OptionsError if the value is not a valid number or is greater than the maximum value for `uint256`. + * @returns The value as a bigint. + */ +export function toUint256(value: string, field: string): bigint { + const isValidNumber = /^\d+$/.test(value); + if (!isValidNumber) { + throw new OptionsError({ + [field]: 'Not a valid number', + }); + } + const numValue = BigInt(value); + if (numValue > UINT256_MAX) { + throw new OptionsError({ + [field]: 'Value is greater than uint256 max value', + }); + } + return numValue; +} diff --git a/packages/core/confidential/src/utils/define-functions.ts b/packages/core/confidential/src/utils/define-functions.ts new file mode 100644 index 000000000..3c89e6c76 --- /dev/null +++ b/packages/core/confidential/src/utils/define-functions.ts @@ -0,0 +1,9 @@ +import type { BaseFunction } from '../contract'; + +type ImplicitNameFunction = Omit; + +export function defineFunctions(fns: Record): Record; + +export function defineFunctions(fns: Record): Record { + return Object.fromEntries(Object.entries(fns).map(([name, fn]) => [name, Object.assign({ name }, fn)])); +} diff --git a/packages/core/confidential/src/utils/duration.ts b/packages/core/confidential/src/utils/duration.ts new file mode 100644 index 000000000..f74ff1c1d --- /dev/null +++ b/packages/core/confidential/src/utils/duration.ts @@ -0,0 +1,52 @@ +const durationUnits = ['block', 'second', 'minute', 'hour', 'day', 'week', 'month', 'year'] as const; +type DurationUnit = (typeof durationUnits)[number]; +export const durationPattern = new RegExp(`^(\\d+(?:\\.\\d+)?) +(${durationUnits.join('|')})s?$`); + +const second = 1; +const minute = 60 * second; +const hour = 60 * minute; +const day = 24 * hour; +const week = 7 * day; +const month = 30 * day; +const year = 365 * day; +const secondsForUnit = { second, minute, hour, day, week, month, year }; + +export function durationToBlocks(duration: string, blockTime: number): number { + const match = duration.trim().match(durationPattern); + + if (!match) { + throw new Error('Bad duration format'); + } + + const value = parseFloat(match[1]!); + const unit = match[2]! as DurationUnit; + + if (unit === 'block') { + if (!Number.isInteger(value)) { + throw new Error('Invalid number of blocks'); + } + + return value; + } + + const durationSeconds = value * secondsForUnit[unit]; + return Math.round(durationSeconds / blockTime); +} + +export function durationToTimestamp(duration: string): string { + const match = duration.trim().match(durationPattern); + + if (!match) { + throw new Error('Bad duration format'); + } + + const value = match[1]!; + const unit = match[2]! as DurationUnit; + + // unit must be a Solidity supported time unit + if (unit === 'block' || unit === 'month' || unit === 'year') { + throw new Error('Invalid unit for timestamp'); + } + + return `${value} ${unit}s`; +} diff --git a/packages/core/confidential/src/utils/find-cover.ts b/packages/core/confidential/src/utils/find-cover.ts new file mode 100644 index 000000000..939ed9240 --- /dev/null +++ b/packages/core/confidential/src/utils/find-cover.ts @@ -0,0 +1,26 @@ +import { sortedBy } from './sorted-by'; + +// Greedy approximation of minimum set cover. + +export function findCover(sets: T[], getElements: (set: T) => unknown[]): T[] { + const sortedSets = sortedBy( + sets.map(set => ({ set, elems: getElements(set) })), + s => -s.elems.length, + ); + + const seen = new Set(); + const res = []; + + for (const { set, elems } of sortedSets) { + let included = false; + for (const e of elems) { + if (!included && !seen.has(e)) { + res.push(set); + included = true; + } + seen.add(e); + } + } + + return res; +} diff --git a/packages/core/confidential/src/utils/format-lines.ts b/packages/core/confidential/src/utils/format-lines.ts new file mode 100644 index 000000000..6ab9aa445 --- /dev/null +++ b/packages/core/confidential/src/utils/format-lines.ts @@ -0,0 +1,30 @@ +export type Lines = string | typeof whitespace | Lines[]; + +const whitespace = Symbol('whitespace'); + +export function formatLines(...lines: Lines[]): string { + return formatLinesWithSpaces(4, ...lines); +} + +export function formatLinesWithSpaces(spacesPerIndent: number, ...lines: Lines[]): string { + return [...indentEach(0, lines, spacesPerIndent)].join('\n') + '\n'; +} + +function* indentEach(indent: number, lines: Lines[], spacesPerIndent: number): Generator { + for (const line of lines) { + if (line === whitespace) { + yield ''; + } else if (Array.isArray(line)) { + yield* indentEach(indent + 1, line, spacesPerIndent); + } else { + yield ' '.repeat(indent * spacesPerIndent) + line; + } + } +} + +export function spaceBetween(...lines: Lines[][]): Lines[] { + return lines + .filter(l => l.length > 0) + .flatMap(l => [whitespace, ...l]) + .slice(1); +} diff --git a/packages/core/confidential/src/utils/imports-libraries.ts b/packages/core/confidential/src/utils/imports-libraries.ts new file mode 100644 index 000000000..7ffc8e2c6 --- /dev/null +++ b/packages/core/confidential/src/utils/imports-libraries.ts @@ -0,0 +1,5 @@ +import type { Contract } from '../contract'; + +export function importsCommunityContracts(contract: Contract) { + return contract.imports.some(i => i.path.startsWith('@openzeppelin/community-contracts/')); +} diff --git a/packages/core/confidential/src/utils/map-values.ts b/packages/core/confidential/src/utils/map-values.ts new file mode 100644 index 000000000..1e42bad36 --- /dev/null +++ b/packages/core/confidential/src/utils/map-values.ts @@ -0,0 +1,8 @@ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export function mapValues(obj: Record, fn: (val: V) => W): Record { + const res = {} as Record; + for (const key in obj) { + res[key] = fn(obj[key]); + } + return res; +} diff --git a/packages/core/confidential/src/utils/sanitize.test.ts b/packages/core/confidential/src/utils/sanitize.test.ts new file mode 100644 index 000000000..327e5dc95 --- /dev/null +++ b/packages/core/confidential/src/utils/sanitize.test.ts @@ -0,0 +1,46 @@ +import test from 'ava'; +import { stringifyUnicodeSafe } from './sanitize'; + +test('stringifyUnicodeSafe', t => { + const cases = [ + { + input: 'My Token', + expected: '"My Token"', + description: 'should handle string with no special characters', + }, + { + input: 'MyToke"ć"', + expected: 'unicode"MyToke\\"ć\\""', + description: 'should escape double quotes and wrap in unicode"" if unicode characters are present', + }, + { + input: '', + expected: '""', + description: 'should handle empty string', + }, + { + input: 'ć', + expected: 'unicode"ć"', + description: 'should handle string with only unicode characters', + }, + { + input: 'MyToken', + expected: '"MyToken"', + description: 'should handle string with no special characters', + }, + { + input: 'MyTok"e"n', + expected: '"MyTok\\"e\\"n"', + description: 'should handle escaped double quotes', + }, + { + input: 'MyTokeć', + expected: 'unicode"MyTokeć"', + description: 'should handle string with mixed ASCII and unicode characters', + }, + ]; + + for (const { input, expected, description } of cases) { + t.is(stringifyUnicodeSafe(input), expected, description); + } +}); diff --git a/packages/core/confidential/src/utils/sanitize.ts b/packages/core/confidential/src/utils/sanitize.ts new file mode 100644 index 000000000..7830cc51f --- /dev/null +++ b/packages/core/confidential/src/utils/sanitize.ts @@ -0,0 +1,6 @@ +export function stringifyUnicodeSafe(str: string): string { + // eslint-disable-next-line no-control-regex + const containsUnicode = /[^\x00-\x7F]/.test(str); + + return containsUnicode ? `unicode"${str.replace(/"/g, '\\"')}"` : JSON.stringify(str); +} diff --git a/packages/core/confidential/src/utils/sorted-by.ts b/packages/core/confidential/src/utils/sorted-by.ts new file mode 100644 index 000000000..c865494bb --- /dev/null +++ b/packages/core/confidential/src/utils/sorted-by.ts @@ -0,0 +1,3 @@ +export function sortedBy(xs: Iterable, fn: (x: T) => number): T[] { + return Array.from(xs).sort((a, b) => fn(a) - fn(b)); +} diff --git a/packages/core/confidential/src/utils/to-identifier.test.ts b/packages/core/confidential/src/utils/to-identifier.test.ts new file mode 100644 index 000000000..6af3b3a11 --- /dev/null +++ b/packages/core/confidential/src/utils/to-identifier.test.ts @@ -0,0 +1,20 @@ +import test from 'ava'; + +import { toIdentifier } from './to-identifier'; + +test('unmodified', t => { + t.is(toIdentifier('abc'), 'abc'); +}); + +test('remove leading specials', t => { + t.is(toIdentifier('--abc'), 'abc'); +}); + +test('remove specials and upcase next char', t => { + t.is(toIdentifier('abc-def'), 'abcDef'); + t.is(toIdentifier('abc--def'), 'abcDef'); +}); + +test('capitalize', t => { + t.is(toIdentifier('abc', true), 'Abc'); +}); diff --git a/packages/core/confidential/src/utils/to-identifier.ts b/packages/core/confidential/src/utils/to-identifier.ts new file mode 100644 index 000000000..70e7c9310 --- /dev/null +++ b/packages/core/confidential/src/utils/to-identifier.ts @@ -0,0 +1,8 @@ +export function toIdentifier(str: string, capitalize = false): string { + return str + .normalize('NFD') + .replace(/[\u0300-\u036f]/g, '') // remove accents + .replace(/^[^a-zA-Z$_]+/, '') + .replace(/^(.)/, c => (capitalize ? c.toUpperCase() : c)) + .replace(/[^\w$]+(.?)/g, (_, c) => c.toUpperCase()); +} diff --git a/packages/core/confidential/src/utils/transitive-closure.ts b/packages/core/confidential/src/utils/transitive-closure.ts new file mode 100644 index 000000000..f2e04ba2d --- /dev/null +++ b/packages/core/confidential/src/utils/transitive-closure.ts @@ -0,0 +1,27 @@ +type T = string; + +export function transitiveClosure(obj: Record>): Record> { + const closure = {} as Record>; + + for (const key in obj) { + closure[key] = reachable(obj, key); + } + + return closure; +} + +export function reachable(obj: Record>, key: T): Set { + let prevSize = 0; + const res = new Set(obj[key]); + + while (prevSize < res.size) { + prevSize = res.size; + for (const k of res) { + for (const v of obj[k] ?? []) { + res.add(v); + } + } + } + + return res; +} diff --git a/packages/core/confidential/src/utils/version.test.ts b/packages/core/confidential/src/utils/version.test.ts new file mode 100644 index 000000000..5a90bc410 --- /dev/null +++ b/packages/core/confidential/src/utils/version.test.ts @@ -0,0 +1,14 @@ +import test from 'ava'; + +import semver from 'semver'; + +import { compatibleContractsSemver } from './version'; +import contracts from '../../openzeppelin-contracts'; + +test('installed contracts satisfies compatible range', t => { + t.true( + semver.satisfies(contracts.version, compatibleContractsSemver), + `Installed contracts version ${contracts.version} does not satisfy compatible range ${compatibleContractsSemver}. +Check whether the compatible range is up to date.`, + ); +}); diff --git a/packages/core/confidential/src/utils/version.ts b/packages/core/confidential/src/utils/version.ts new file mode 100644 index 000000000..10ab4ab89 --- /dev/null +++ b/packages/core/confidential/src/utils/version.ts @@ -0,0 +1,4 @@ +/** + * Semantic version string representing of the minimum compatible version of Contracts to display in output. + */ +export const compatibleContractsSemver = '^5.4.0'; diff --git a/packages/core/confidential/src/zip-foundry.test.ts b/packages/core/confidential/src/zip-foundry.test.ts new file mode 100644 index 000000000..f35bf200b --- /dev/null +++ b/packages/core/confidential/src/zip-foundry.test.ts @@ -0,0 +1,223 @@ +import type { TestFn, ExecutionContext } from 'ava'; +import _test from 'ava'; + +import { zipFoundry } from './zip-foundry'; + +import { buildERC20 } from './erc20'; +import { buildERC721 } from './erc721'; +import { buildERC1155 } from './erc1155'; +import { buildCustom } from './custom'; +import { promises as fs } from 'fs'; +import path from 'path'; +import os from 'os'; +import util from 'util'; +import child from 'child_process'; +import type { Contract } from './contract'; +import { rimraf } from 'rimraf'; +import type { JSZipObject } from 'jszip'; +import type JSZip from 'jszip'; +import type { GenericOptions } from './build-generic'; + +interface Context { + tempFolder: string; +} + +const test = _test as TestFn; + +test.beforeEach(async t => { + t.context.tempFolder = await fs.mkdtemp(path.join(os.tmpdir(), 'openzeppelin-wizard-')); +}); + +test.afterEach.always(async t => { + await rimraf(t.context.tempFolder); +}); + +test.serial('erc20 full', async t => { + const opts: GenericOptions = { + kind: 'ERC20', + name: 'My Token', + symbol: 'MTK', + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + permit: true, + votes: true, + flashmint: true, + }; + const c = buildERC20(opts); + await runTest(c, t, opts); +}); + +test.serial('erc20 ownable, uups, crossChainBridging custom', async t => { + const opts: GenericOptions = { + kind: 'ERC20', + name: 'My Token', + symbol: 'MTK', + premint: '2000', + access: 'ownable', + burnable: true, + mintable: true, + pausable: true, + permit: true, + votes: true, + flashmint: true, + crossChainBridging: 'custom', + premintChainId: '10', + upgradeable: 'uups', + }; + const c = buildERC20(opts); + await runTest(c, t, opts); +}); + +test.serial('erc20 uups, roles', async t => { + const opts: GenericOptions = { + kind: 'ERC20', + name: 'My Token', + symbol: 'MTK', + upgradeable: 'uups', + access: 'roles', + }; + const c = buildERC20(opts); + await runTest(c, t, opts); +}); + +test.serial('erc721 uups, ownable', async t => { + const opts: GenericOptions = { + kind: 'ERC721', + name: 'My Token', + symbol: 'MTK', + upgradeable: 'uups', + access: 'ownable', + }; + const c = buildERC721(opts); + await runTest(c, t, opts); +}); + +test.serial('erc1155 basic', async t => { + const opts: GenericOptions = { + kind: 'ERC1155', + name: 'My Token', + uri: 'https://myuri/{id}', + }; + const c = buildERC1155(opts); + await runTest(c, t, opts); +}); + +test.serial('erc1155 transparent, ownable', async t => { + const opts: GenericOptions = { + kind: 'ERC1155', + name: 'My Token', + uri: 'https://myuri/{id}', + upgradeable: 'transparent', + access: 'ownable', + }; + const c = buildERC1155(opts); + await runTest(c, t, opts); +}); + +test.serial('custom basic', async t => { + const opts: GenericOptions = { kind: 'Custom', name: 'My Contract' }; + const c = buildCustom(opts); + await runTest(c, t, opts); +}); + +test.serial('custom transparent, managed', async t => { + const opts: GenericOptions = { + kind: 'Custom', + name: 'My Contract', + upgradeable: 'transparent', + access: 'managed', + }; + const c = buildCustom(opts); + await runTest(c, t, opts); +}); + +async function runTest(c: Contract, t: ExecutionContext, opts: GenericOptions) { + const zip = await zipFoundry(c, opts); + + assertLayout(zip, c, t); + await extractAndRunPackage(zip, c, t); + await assertContents(zip, c, t); +} + +function assertLayout(zip: JSZip, c: Contract, t: ExecutionContext) { + const sorted = Object.values(zip.files) + .map(f => f.name) + .sort(); + t.deepEqual(sorted, [ + 'README.md', + 'script/', + `script/${c.name}.s.sol`, + 'setup.sh', + 'src/', + `src/${c.name}.sol`, + 'test/', + `test/${c.name}.t.sol`, + ]); +} + +async function extractAndRunPackage(zip: JSZip, c: Contract, t: ExecutionContext) { + const files = Object.values(zip.files); + + const tempFolder = t.context.tempFolder; + + const items = Object.values(files); + for (const item of items) { + if (item.dir) { + await fs.mkdir(path.join(tempFolder, item.name)); + } else { + await fs.writeFile(path.join(tempFolder, item.name), await asString(item)); + } + } + + const setGitUser = 'git init && git config user.email "test@test.test" && git config user.name "Test"'; + const setup = 'bash setup.sh'; + const test = 'forge test' + (c.upgradeable ? ' --force' : ''); + const script = `forge script script/${c.name}.s.sol` + (c.upgradeable ? ' --force' : ''); + + const exec = (cmd: string) => util.promisify(child.exec)(cmd, { env: { ...process.env, NO_COLOR: '' } }); + + const command = `cd "${tempFolder}" && ${setGitUser} && ${setup} && ${test} && ${script}`; + const result = await exec(command); + + t.regex(result.stdout, /Initializing Foundry project\.\.\.\nDone\./); + t.regex(result.stdout, /1 passed/); + + if (c.constructorArgs === undefined) { + // the deployment is only run by default if there are no constructor args + t.regex(result.stdout, /deployed to /); + } + + const rerunCommand = `cd "${tempFolder}" && ${setup}`; + const rerunResult = await exec(rerunCommand); + + t.regex(rerunResult.stdout, /Foundry project already initialized\./); +} + +async function assertContents(zip: JSZip, c: Contract, t: ExecutionContext) { + const normalizeVersion = (text: string) => text.replace(/\bv\d+\.\d+\.\d+\b/g, 'vX.Y.Z'); + + const contentComparison = [ + normalizeVersion(await getItemString(zip, `setup.sh`)), + await getItemString(zip, `README.md`), + await getItemString(zip, `script/${c.name}.s.sol`), + await getItemString(zip, `src/${c.name}.sol`), + await getItemString(zip, `test/${c.name}.t.sol`), + ]; + + t.snapshot(contentComparison); +} + +async function getItemString(zip: JSZip, key: string) { + const obj = zip.files[key]; + if (obj === undefined) { + throw Error(`Item ${key} not found in zip`); + } + return await asString(obj); +} + +async function asString(item: JSZipObject) { + return Buffer.from(await item.async('arraybuffer')).toString(); +} diff --git a/packages/core/confidential/src/zip-foundry.test.ts.md b/packages/core/confidential/src/zip-foundry.test.ts.md new file mode 100644 index 000000000..94009d407 --- /dev/null +++ b/packages/core/confidential/src/zip-foundry.test.ts.md @@ -0,0 +1,1453 @@ +# Snapshot report for `src/zip-foundry.test.ts` + +The actual snapshot is saved in `zip-foundry.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## erc20 full + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts␊ + forge install OpenZeppelin/openzeppelin-contracts@vX.Y.Z --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyToken.s.sol␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address recipient = ;␊ + address defaultAdmin = ;␊ + address pauser = ;␊ + address minter = ;␊ + MyToken instance = new MyToken(recipient, defaultAdmin, pauser, minter);␊ + console.log("Contract deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + constructor(address recipient, address defaultAdmin, address pauser, address minter)␊ + ERC20("My Token", "MTK")␊ + ERC20Permit("My Token")␊ + {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenTest is Test {␊ + MyToken public instance;␊ + ␊ + function setUp() public {␊ + address recipient = vm.addr(1);␊ + address defaultAdmin = vm.addr(2);␊ + address pauser = vm.addr(3);␊ + address minter = vm.addr(4);␊ + instance = new MyToken(recipient, defaultAdmin, pauser, minter);␊ + }␊ + ␊ + function testName() public view {␊ + assertEq(instance.name(), "My Token");␊ + }␊ + }␊ + `, + ] + +## erc20 ownable, uups, crossChainBridging custom + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts and Upgrades␊ + forge install OpenZeppelin/openzeppelin-contracts-upgradeable@vX.Y.Z --quiet␊ + forge install OpenZeppelin/openzeppelin-foundry-upgrades --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + echo "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/" >> remappings.txt␊ + ␊ + # Add settings in foundry.toml␊ + echo "" >> foundry.toml␊ + echo "ffi = true" >> foundry.toml␊ + echo "ast = true" >> foundry.toml␊ + echo "build_info = true" >> foundry.toml␊ + echo "extra_output = [\\"storageLayout\\"]" >> foundry.toml␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test --force␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyToken.s.sol --force␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address tokenBridge_ = ;␊ + address recipient = ;␊ + address initialOwner = ;␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (tokenBridge_, recipient, initialOwner))␊ + );␊ + MyToken instance = MyToken(proxy);␊ + console.log("Proxy deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, OwnableUpgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address tokenBridge_, address recipient, address initialOwner)␊ + public initializer␊ + {␊ + __ERC20_init("My Token", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __Ownable_init(initialOwner);␊ + __ERC20Permit_init("My Token");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyOwner {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenTest is Test {␊ + MyToken public instance;␊ + ␊ + function setUp() public {␊ + address tokenBridge_ = vm.addr(1);␊ + address recipient = vm.addr(2);␊ + address initialOwner = vm.addr(3);␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (tokenBridge_, recipient, initialOwner))␊ + );␊ + instance = MyToken(proxy);␊ + }␊ + ␊ + function testName() public view {␊ + assertEq(instance.name(), "My Token");␊ + }␊ + }␊ + `, + ] + +## erc20 uups, roles + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts and Upgrades␊ + forge install OpenZeppelin/openzeppelin-contracts-upgradeable@vX.Y.Z --quiet␊ + forge install OpenZeppelin/openzeppelin-foundry-upgrades --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + echo "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/" >> remappings.txt␊ + ␊ + # Add settings in foundry.toml␊ + echo "" >> foundry.toml␊ + echo "ffi = true" >> foundry.toml␊ + echo "ast = true" >> foundry.toml␊ + echo "build_info = true" >> foundry.toml␊ + echo "extra_output = [\\"storageLayout\\"]" >> foundry.toml␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test --force␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyToken.s.sol --force␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address defaultAdmin = ;␊ + address upgrader = ;␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (defaultAdmin, upgrader))␊ + );␊ + MyToken instance = MyToken(proxy);␊ + console.log("Proxy deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20PermitUpgradeable, AccessControlUpgradeable, UUPSUpgradeable {␊ + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE");␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address defaultAdmin, address upgrader)␊ + public initializer␊ + {␊ + __ERC20_init("My Token", "MTK");␊ + __ERC20Permit_init("My Token");␊ + __AccessControl_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(UPGRADER_ROLE, upgrader);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyRole(UPGRADER_ROLE)␊ + {}␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenTest is Test {␊ + MyToken public instance;␊ + ␊ + function setUp() public {␊ + address defaultAdmin = vm.addr(1);␊ + address upgrader = vm.addr(2);␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (defaultAdmin, upgrader))␊ + );␊ + instance = MyToken(proxy);␊ + }␊ + ␊ + function testName() public view {␊ + assertEq(instance.name(), "My Token");␊ + }␊ + }␊ + `, + ] + +## erc721 uups, ownable + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts and Upgrades␊ + forge install OpenZeppelin/openzeppelin-contracts-upgradeable@vX.Y.Z --quiet␊ + forge install OpenZeppelin/openzeppelin-foundry-upgrades --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + echo "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/" >> remappings.txt␊ + ␊ + # Add settings in foundry.toml␊ + echo "" >> foundry.toml␊ + echo "ffi = true" >> foundry.toml␊ + echo "ast = true" >> foundry.toml␊ + echo "build_info = true" >> foundry.toml␊ + echo "extra_output = [\\"storageLayout\\"]" >> foundry.toml␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test --force␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyToken.s.sol --force␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address initialOwner = ;␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (initialOwner))␊ + );␊ + MyToken instance = MyToken(proxy);␊ + console.log("Proxy deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialOwner) public initializer {␊ + __ERC721_init("My Token", "MTK");␊ + __Ownable_init(initialOwner);␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenTest is Test {␊ + MyToken public instance;␊ + ␊ + function setUp() public {␊ + address initialOwner = vm.addr(1);␊ + address proxy = Upgrades.deployUUPSProxy(␊ + "MyToken.sol",␊ + abi.encodeCall(MyToken.initialize, (initialOwner))␊ + );␊ + instance = MyToken(proxy);␊ + }␊ + ␊ + function testName() public view {␊ + assertEq(instance.name(), "My Token");␊ + }␊ + }␊ + `, + ] + +## erc1155 basic + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts␊ + forge install OpenZeppelin/openzeppelin-contracts@vX.Y.Z --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyToken.s.sol␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address initialOwner = ;␊ + MyToken instance = new MyToken(initialOwner);␊ + console.log("Contract deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC1155, Ownable {␊ + constructor(address initialOwner)␊ + ERC1155("https://myuri/{id}")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenTest is Test {␊ + MyToken public instance;␊ + ␊ + function setUp() public {␊ + address initialOwner = vm.addr(1);␊ + instance = new MyToken(initialOwner);␊ + }␊ + ␊ + function testUri() public view {␊ + assertEq(instance.uri(0), "https://myuri/{id}");␊ + }␊ + }␊ + `, + ] + +## erc1155 transparent, ownable + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts and Upgrades␊ + forge install OpenZeppelin/openzeppelin-contracts-upgradeable@vX.Y.Z --quiet␊ + forge install OpenZeppelin/openzeppelin-foundry-upgrades --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + echo "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/" >> remappings.txt␊ + ␊ + # Add settings in foundry.toml␊ + echo "" >> foundry.toml␊ + echo "ffi = true" >> foundry.toml␊ + echo "ast = true" >> foundry.toml␊ + echo "build_info = true" >> foundry.toml␊ + echo "extra_output = [\\"storageLayout\\"]" >> foundry.toml␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test --force␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyToken.s.sol --force␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address initialOwner = ;␊ + address proxy = Upgrades.deployTransparentProxy(␊ + "MyToken.sol",␊ + initialOwner,␊ + abi.encodeCall(MyToken.initialize, (initialOwner))␊ + );␊ + MyToken instance = MyToken(proxy);␊ + console.log("Proxy deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC1155Upgradeable, OwnableUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialOwner) public initializer {␊ + __ERC1155_init("https://myuri/{id}");␊ + __Ownable_init(initialOwner);␊ + }␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyToken} from "src/MyToken.sol";␊ + ␊ + contract MyTokenTest is Test {␊ + MyToken public instance;␊ + ␊ + function setUp() public {␊ + address initialOwner = vm.addr(1);␊ + address proxy = Upgrades.deployTransparentProxy(␊ + "MyToken.sol",␊ + initialOwner,␊ + abi.encodeCall(MyToken.initialize, (initialOwner))␊ + );␊ + instance = MyToken(proxy);␊ + }␊ + ␊ + function testUri() public view {␊ + assertEq(instance.uri(0), "https://myuri/{id}");␊ + }␊ + }␊ + `, + ] + +## custom basic + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts␊ + forge install OpenZeppelin/openzeppelin-contracts@vX.Y.Z --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyContract.s.sol␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {MyContract} from "src/MyContract.sol";␊ + ␊ + contract MyContractScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + vm.startBroadcast();␊ + MyContract instance = new MyContract();␊ + console.log("Contract deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract MyContract {␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {MyContract} from "src/MyContract.sol";␊ + ␊ + contract MyContractTest is Test {␊ + MyContract public instance;␊ + ␊ + function setUp() public {␊ + instance = new MyContract();␊ + }␊ + ␊ + function testSomething() public {␊ + // Add your test here␊ + }␊ + }␊ + `, + ] + +## custom transparent, managed + +> Snapshot 1 + + [ + `#!/usr/bin/env bash␊ + ␊ + # Check if git is installed␊ + if ! which git &> /dev/null␊ + then␊ + echo "git command not found. Install git and try again."␊ + exit 1␊ + fi␊ + ␊ + # Check if Foundry is installed␊ + if ! which forge &> /dev/null␊ + then␊ + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation"␊ + exit 1␊ + fi␊ + ␊ + # Setup Foundry project␊ + if ! [ -f "foundry.toml" ]␊ + then␊ + echo "Initializing Foundry project..."␊ + ␊ + # Backup Wizard template readme to avoid it being overwritten␊ + mv README.md README-oz.md␊ + ␊ + # Initialize sample Foundry project␊ + forge init --force --quiet␊ + ␊ + # Install OpenZeppelin Contracts and Upgrades␊ + forge install OpenZeppelin/openzeppelin-contracts-upgradeable@vX.Y.Z --quiet␊ + forge install OpenZeppelin/openzeppelin-foundry-upgrades --quiet␊ + ␊ + # Remove unneeded Foundry template files␊ + rm src/Counter.sol␊ + rm script/Counter.s.sol␊ + rm test/Counter.t.sol␊ + rm README.md␊ + ␊ + # Restore Wizard template readme␊ + mv README-oz.md README.md␊ + ␊ + # Add remappings␊ + if [ -f "remappings.txt" ]␊ + then␊ + echo "" >> remappings.txt␊ + fi␊ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/" >> remappings.txt␊ + echo "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/" >> remappings.txt␊ + ␊ + # Add settings in foundry.toml␊ + echo "" >> foundry.toml␊ + echo "ffi = true" >> foundry.toml␊ + echo "ast = true" >> foundry.toml␊ + echo "build_info = true" >> foundry.toml␊ + echo "extra_output = [\\"storageLayout\\"]" >> foundry.toml␊ + ␊ + # Perform initial git commit␊ + git add .␊ + git commit -m "openzeppelin: add wizard output" --quiet␊ + ␊ + echo "Done."␊ + else␊ + echo "Foundry project already initialized."␊ + fi␊ + `, + `# Sample Foundry Project␊ + ␊ + This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract.␊ + ␊ + ## Installing Foundry␊ + ␊ + See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation).␊ + ␊ + ## Initializing the project␊ + ␊ + \`\`\`␊ + bash setup.sh␊ + \`\`\`␊ + ␊ + ## Testing the contract␊ + ␊ + \`\`\`␊ + forge test --force␊ + \`\`\`␊ + ␊ + ## Deploying the contract␊ + ␊ + You can simulate a deployment by running the script:␊ + ␊ + \`\`\`␊ + forge script script/MyContract.s.sol --force␊ + \`\`\`␊ + ␊ + See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information.␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Script} from "forge-std/Script.sol";␊ + import {console} from "forge-std/console.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyContract} from "src/MyContract.sol";␊ + ␊ + contract MyContractScript is Script {␊ + function setUp() public {}␊ + ␊ + function run() public {␊ + // TODO: Set addresses for the variables below, then uncomment the following section:␊ + /*␊ + vm.startBroadcast();␊ + address initialOwner = ;␊ + address initialAuthority = ;␊ + address proxy = Upgrades.deployTransparentProxy(␊ + "MyContract.sol",␊ + initialOwner,␊ + abi.encodeCall(MyContract.initialize, (initialAuthority))␊ + );␊ + MyContract instance = MyContract(proxy);␊ + console.log("Proxy deployed to %s", address(instance));␊ + vm.stopBroadcast();␊ + */␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyContract is Initializable, AccessManagedUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialAuthority) public initializer {␊ + __AccessManaged_init(initialAuthority);␊ + }␊ + }␊ + `, + `// SPDX-License-Identifier: MIT␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Test} from "forge-std/Test.sol";␊ + import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";␊ + import {MyContract} from "src/MyContract.sol";␊ + ␊ + contract MyContractTest is Test {␊ + MyContract public instance;␊ + ␊ + function setUp() public {␊ + address initialOwner = vm.addr(1);␊ + address initialAuthority = vm.addr(2);␊ + address proxy = Upgrades.deployTransparentProxy(␊ + "MyContract.sol",␊ + initialOwner,␊ + abi.encodeCall(MyContract.initialize, (initialAuthority))␊ + );␊ + instance = MyContract(proxy);␊ + }␊ + ␊ + function testSomething() public {␊ + // Add your test here␊ + }␊ + }␊ + `, + ] diff --git a/packages/core/confidential/src/zip-foundry.test.ts.snap b/packages/core/confidential/src/zip-foundry.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..c21d462076ff18cf64ff105ff1a139b143171561 GIT binary patch literal 3951 zcmV-#50LOdRzVqf00000000B+Tw9MEM-}d|cO z?bTi&iIZ$RazuJe7>{ds%KrS=2m{^ExgDuFr)#^pC z*hTgOfZL#h1;89&!Uc3)@Ed0*=keI zgTw)Z3ecuLaZIojY6?2bCc*jub|5BZO?G{R1(>b2al(lAWLMTNG^9;g2MsYLY#(Bb z9w2EDSVIVOh3N5XmbFFc1G9rfI}|l}*Xkf4FzK|ofJ`9AQno>XDalM`4GF&&4b)@w zGh~Z!68Ax?EsYEn3+lNw@NsemO9TrHUHll6PFjg+nzd>bfQ#TJv>*6A@B{o9G6x9c z^;{?rUGIZPXV%U)16^H=MvNN|0HrBA27+S}Ga=bfvTV+8X>AIc7~R zMwJ9B6`citf9fJwONR7{3hC;47xPG^gFH&OU{D|qpiGw7j=K090UL5;f~8<~h=Uz0 zx&Q+0I?zD`$<7Yg>Vx}SAPD7B0ip{XHuR9OEGD`r${f{CKmD{S zpFM!fG->i~a7Ff6M_g!eJ%La@%oWlXk?^fxx>@lLs1IyN0LPvmtV5_g;~^sC&0szu zx?AYKYwj2$>`jk?&uqOatnzA@Y;CAbxJY002zaiyve+-6Uv z5=`Xc3fyT%F?>qL@K;Y;7Fb)k^?vIPwh`f|wd5coa2q3b4J_0Vi_;aK5yIoaCvNZ6)?Qx|2WRYOW#`Amz;tQ)y8 z5UfV4L|qR@mCt5jau90lWC3pHN~{@M1- zAoOoC3LP7AQEyxi8q{EbAshFwR5lOZkyZ>YXpt^r=ti=agWAw{#e(BuqB|z84e8s1 zK1WRVQon}Cdssf!w7mM2Bd_jIm?4Obz&s#mM_;Z-^J*q6Z7K_zO0#m0ju)49>NUL= zP|FiJa@X=rUTbPI>UzwE>K?eA_A*|-WK{v!t?ouk<+NTZGiOIF70UvP)ayZkw_Frv z@%$YN_~f$rmN_%V+FGz}#Cgz>x_T89J%?c+Y$f`n*3<3P#krYLdW5_kRv;SwKTpX` zpAi}Pdr^iS2}C%igj)$6dHUaTA@43@A`UV@q$F>I73lMW&OqzP)sL8m4`hC*Ay4=B zsX+W7ssjZn&37rWM{D&3cDWVG7A0YseuH6}AaSGBPwllPNW`jc4Q8!=1a_*wqr0hc z^HyIV{^p!c*fJvsNCa3}*jT&0y19Dq&TTLc9w6I>59Tgksn=o+HMQQ0bSy93UC-4K zYmhpkTqKxp3(D%5wB5|j$<0)@ZKkqmBTy{=3#MMLE%!m-+FBFTme;>mO9_Ndi;0Ep zPa>&JsW+Zu=VoSRz$Gv{11?If^wY+pU zn0zux=l6>FTW9fn!I)E1X?{2KaP)`{vuMkm3+Q3pX^m#)FWSE;A4Fw z1#JQ!6ES!B3V@!h{j%f4Cf>;0EU7?sObjRYB#C{69-jlqP*9#TxjO_5J@hdP>ju5c zG*c#T`aK5<6j?17{~#FSbJ&Kij|O2E+$93t=z<=%9$)!`r9N2B>CohU4>4045*i=} z4hPKlGzs!gWHsF(@ih~=Ir_Pc(N2MxI@yHzY@mT5;WNTPUClmibJ(s-SH^@!XnO}+ zi0AYc;)!AG{t=>ajuMXQ%7j9m+JyTw;&o+i` zRkhe$qhMF61>S5FY(urcTT0*%_M6E%K^Bj9p%+UWGQ#xKIY&&~ei&^zO%jO8yd5Ry z>uQ&&5Zp&*2;tHl^_cYi9&ZAhQO*~;5R;n>I~}>yZJ!J3Wntd0|0fUT{q_rn@!uB> z<4@-ddX$yn*{SdL0HGv@guJ<%gZ+3QOa^{aQ~y4j3?MZcVM6T;-lKf*}f+l#{Y8(JpA*N<^6KlBM}Y3Y(1NOJ=L!WYyAXj9|wiEBep`~C3>DxcnyrLOLnxHgPeVDwQR z%txCzGhBTe8!KxovZ=1B>stIaHq}MAg-t|k>YzpFx^*ow$nQ;1k59cBN8sWXHo{WA zQOHT?`YAxCvFT{4OB(~1iTl?e=<)|(nT+7s<{%pf@_ zE+(NQm($tj#Nt#>@f_~$9Ay0{(lV3?r}-ZdLeotgEKB^72fI z_R6;8tcfPb`XIrGWv{1$E6tN7no=`Q0kvvl6MKS&4=KbLWnhCqUvw#xWmH|WUY2En zcSAh#8hspX*IGW|u#H+!?rh@JScWP~FdhyL95TR>7%yU32G9I@-bSdI-QqNJ_b+L_ zAf}k5*|W{Svzt;Phl{(O792!H*d<3o#YR!Pj*y&o6(?a!VnSIhLFA;(&dLRmRAfpN zPdNgqsEQc5?Twacg7k63B>24`gr~)PwWUrY(_k z?11@sFgp_uHn2ZFbT>B|H*E<-uMcdAg3^{yG;2gmS;!J-{wZdUG&vNOo{3GX0T|jw zOk@^do*_A0X1FCk5FMIPaflRXM)y$KbKvpF7b^0i@d(;kl1PrMuR`cyG+jBkpe+j5 z{z)QR$9%x#J~XC}jZN5`*?mlyqy61caUgG_+vO(79QTyGv9oF;lx5JM5&JB?_< zP!wUp9P-1ELJpZ@MqR{nUIzNjFqYUmXBgku^UFXbOI)(VB}-hg#3f5yvcx4zT(ZO^ zOMFsT;?0sJekNGrgS-o-+#7Md(eLBrd6UO=wMi#{*!|U+<9>(iU@T3Msys&Rh^XXa zqYWoc-Ayawl>^ch#YGY8RP@%>#>#hA7jEUgca>viotw2XnvNQ;e0JUgNcuVd;C?>vIZb$FVtMAEl4(Tp z>fG!&kmPu$(~AJdBL)K#=Y4bFzdI%Tw;%Yg;0R|L{yWAe&~YMq9%AX}-or~G95sm>v6Ny|^RPaP^V z;^XK!h18LM0sUW<;{izIUU}?qT}xs8Z$3aV=4aHE^oUPf%V8n_Km}ml=b-c7J68(o zHJvuRzR$4r1UtL24?HXF^{kF3=~7uPmer*?7fc4Phdj#qGLC$PhrfBNIx5j2???V@ zWDq=U->@A~%#OQYvqj|w!(-NzKEvUQ@_BKR{+8_5ba^QlB)kV%@X})O!I8Iz9US@Y zIm7tlYvsX_vf4bk)n<8c(77v3okj+79^{tk|;56X?v z>|K1Ur}#|C`y-drn;Wk7qSG8N{j=ya$17(I;~y^?#%{Gd%~9fOCl_BUPjgH! z2KF?c=J-R2znpCR<;ZatowBCtK*wJXfl;08fe!7q|Bs9#EdF!651!=JNgp09fxqwA$*FasiS51I84(uQT49ZPNOUpj%EoFz_BEu!Edzh47`n7cubvd(kj{eab!PXtfYGmqnmtW9(KdG&p)h&w)pe`h4^II&OqE{6r>!I<%|DrHuY%A=zDa{-Jj z7hh!N^s?`RkRHXrC+3!5)(1L<5a7Q!fdu%JphJ5k!*f#Z9zS0?HJNo(Iz1#{?Em^W J_As-a005Zge7^ty literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/zip-foundry.ts b/packages/core/confidential/src/zip-foundry.ts new file mode 100644 index 000000000..586711c22 --- /dev/null +++ b/packages/core/confidential/src/zip-foundry.ts @@ -0,0 +1,304 @@ +import JSZip from 'jszip'; +import type { GenericOptions } from './build-generic'; +import type { Contract } from './contract'; +import { printContract } from './print'; +import SOLIDITY_VERSION from './solidity-version.json'; +import contracts from '../openzeppelin-contracts'; +import type { Lines } from './utils/format-lines'; +import { formatLinesWithSpaces, spaceBetween } from './utils/format-lines'; + +function getHeader(c: Contract) { + return [`// SPDX-License-Identifier: ${c.license}`, `pragma solidity ^${SOLIDITY_VERSION};`]; +} + +const test = (c: Contract, opts?: GenericOptions) => { + return formatLinesWithSpaces(2, ...spaceBetween(getHeader(c), getImports(c), getTestCase(c))); + + function getImports(c: Contract) { + const result = ['import {Test} from "forge-std/Test.sol";']; + if (c.upgradeable) { + result.push('import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";'); + } + result.push(`import {${c.name}} from "src/${c.name}.sol";`); + return result; + } + + function getTestCase(c: Contract) { + const args = getAddressArgs(c); + return [ + `contract ${c.name}Test is Test {`, + spaceBetween( + [`${c.name} public instance;`], + ['function setUp() public {', getAddressVariables(c, args), getDeploymentCode(c, args), '}'], + getContractSpecificTestFunction(), + ), + '}', + ]; + } + + function getDeploymentCode(c: Contract, args: string[]): Lines[] { + if (c.upgradeable) { + if (opts?.upgradeable === 'transparent') { + return [ + `address proxy = Upgrades.deployTransparentProxy(`, + [`"${c.name}.sol",`, `initialOwner,`, `abi.encodeCall(${c.name}.initialize, (${args.join(', ')}))`], + ');', + `instance = ${c.name}(proxy);`, + ]; + } else { + return [ + `address proxy = Upgrades.deployUUPSProxy(`, + [`"${c.name}.sol",`, `abi.encodeCall(${c.name}.initialize, (${args.join(', ')}))`], + ');', + `instance = ${c.name}(proxy);`, + ]; + } + } else { + return [`instance = new ${c.name}(${args.join(', ')});`]; + } + } + + function getAddressVariables(c: Contract, args: string[]): Lines[] { + const vars = []; + let i = 1; // private key index starts from 1 since it must be non-zero + if (c.upgradeable && opts?.upgradeable === 'transparent' && !args.includes('initialOwner')) { + vars.push(`address initialOwner = vm.addr(${i++});`); + } + for (const arg of args) { + vars.push(`address ${arg} = vm.addr(${i++});`); + } + return vars; + } + + function getContractSpecificTestFunction(): Lines[] { + if (opts !== undefined) { + switch (opts.kind) { + case 'ERC20': + case 'ERC721': + return ['function testName() public view {', [`assertEq(instance.name(), "${opts.name}");`], '}']; + + case 'ERC1155': + return ['function testUri() public view {', [`assertEq(instance.uri(0), "${opts.uri}");`], '}']; + + case 'Governor': + case 'Custom': + return ['function testSomething() public {', ['// Add your test here'], '}']; + + default: + throw new Error('Unknown ERC'); + } + } + return []; + } +}; + +function getAddressArgs(c: Contract): string[] { + const args = []; + for (const constructorArg of c.constructorArgs) { + if (constructorArg.type === 'address') { + args.push(constructorArg.name); + } + } + return args; +} + +const script = (c: Contract, opts?: GenericOptions) => { + return formatLinesWithSpaces(2, ...spaceBetween(getHeader(c), getImports(c), getScript(c))); + + function getImports(c: Contract) { + const result = ['import {Script} from "forge-std/Script.sol";', 'import {console} from "forge-std/console.sol";']; + if (c.upgradeable) { + result.push('import {Upgrades} from "openzeppelin-foundry-upgrades/Upgrades.sol";'); + } + result.push(`import {${c.name}} from "src/${c.name}.sol";`); + return result; + } + + function getScript(c: Contract) { + const args = getAddressArgs(c); + const deploymentLines = [ + 'vm.startBroadcast();', + ...getAddressVariables(c, args), + ...getDeploymentCode(c, args), + `console.log("${c.upgradeable ? 'Proxy' : 'Contract'} deployed to %s", address(instance));`, + 'vm.stopBroadcast();', + ]; + return [ + `contract ${c.name}Script is Script {`, + spaceBetween( + ['function setUp() public {}'], + ['function run() public {', args.length > 0 ? addTodoAndCommentOut(deploymentLines) : deploymentLines, '}'], + ), + '}', + ]; + } + + function getDeploymentCode(c: Contract, args: string[]): Lines[] { + if (c.upgradeable) { + if (opts?.upgradeable === 'transparent') { + return [ + `address proxy = Upgrades.deployTransparentProxy(`, + [`"${c.name}.sol",`, `initialOwner,`, `abi.encodeCall(${c.name}.initialize, (${args.join(', ')}))`], + ');', + `${c.name} instance = ${c.name}(proxy);`, + ]; + } else { + return [ + `address proxy = Upgrades.deployUUPSProxy(`, + [`"${c.name}.sol",`, `abi.encodeCall(${c.name}.initialize, (${args.join(', ')}))`], + ');', + `${c.name} instance = ${c.name}(proxy);`, + ]; + } + } else { + return [`${c.name} instance = new ${c.name}(${args.join(', ')});`]; + } + } + + function getAddressVariables(c: Contract, args: string[]): Lines[] { + const vars = []; + if (c.upgradeable && opts?.upgradeable === 'transparent' && !args.includes('initialOwner')) { + vars.push('address initialOwner = ;'); + } + for (const arg of args) { + vars.push(`address ${arg} = ;`); + } + return vars; + } + + function addTodoAndCommentOut(lines: Lines[]) { + return [ + '// TODO: Set addresses for the variables below, then uncomment the following section:', + '/*', + ...lines, + '*/', + ]; + } +}; + +const setupSh = (c: Contract) => `\ +#!/usr/bin/env bash + +# Check if git is installed +if ! which git &> /dev/null +then + echo "git command not found. Install git and try again." + exit 1 +fi + +# Check if Foundry is installed +if ! which forge &> /dev/null +then + echo "forge command not found. Install Foundry and try again. See https://book.getfoundry.sh/getting-started/installation" + exit 1 +fi + +# Setup Foundry project +if ! [ -f "foundry.toml" ] +then + echo "Initializing Foundry project..." + + # Backup Wizard template readme to avoid it being overwritten + mv README.md README-oz.md + + # Initialize sample Foundry project + forge init --force --quiet + +${ + c.upgradeable + ? `\ + # Install OpenZeppelin Contracts and Upgrades + forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v${contracts.version} --quiet + forge install OpenZeppelin/openzeppelin-foundry-upgrades --quiet\ +` + : `\ + # Install OpenZeppelin Contracts + forge install OpenZeppelin/openzeppelin-contracts@v${contracts.version} --quiet\ +` +} + + # Remove unneeded Foundry template files + rm src/Counter.sol + rm script/Counter.s.sol + rm test/Counter.t.sol + rm README.md + + # Restore Wizard template readme + mv README-oz.md README.md + + # Add remappings + if [ -f "remappings.txt" ] + then + echo "" >> remappings.txt + fi +${ + c.upgradeable + ? `\ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/" >> remappings.txt + echo "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/" >> remappings.txt + + # Add settings in foundry.toml + echo "" >> foundry.toml + echo "ffi = true" >> foundry.toml + echo "ast = true" >> foundry.toml + echo "build_info = true" >> foundry.toml + echo "extra_output = [\\"storageLayout\\"]" >> foundry.toml\ +` + : `\ + echo "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/" >> remappings.txt\ +` +} + + # Perform initial git commit + git add . + git commit -m "openzeppelin: add wizard output" --quiet + + echo "Done." +else + echo "Foundry project already initialized." +fi +`; + +const readme = (c: Contract) => `\ +# Sample Foundry Project + +This project demonstrates a basic Foundry use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, and a script that deploys that contract. + +## Installing Foundry + +See [Foundry installation guide](https://book.getfoundry.sh/getting-started/installation). + +## Initializing the project + +\`\`\` +bash setup.sh +\`\`\` + +## Testing the contract + +\`\`\` +forge test${c.upgradeable ? ' --force' : ''} +\`\`\` + +## Deploying the contract + +You can simulate a deployment by running the script: + +\`\`\` +forge script script/${c.name}.s.sol${c.upgradeable ? ' --force' : ''} +\`\`\` + +See [Solidity scripting guide](https://book.getfoundry.sh/guides/scripting-with-solidity) for more information. +`; + +export async function zipFoundry(c: Contract, opts?: GenericOptions) { + const zip = new JSZip(); + + zip.file(`src/${c.name}.sol`, printContract(c)); + zip.file(`test/${c.name}.t.sol`, test(c, opts)); + zip.file(`script/${c.name}.s.sol`, script(c, opts)); + zip.file('setup.sh', setupSh(c)); + zip.file('README.md', readme(c)); + + return zip; +} diff --git a/packages/core/confidential/src/zip-hardhat.test.ts b/packages/core/confidential/src/zip-hardhat.test.ts new file mode 100644 index 000000000..097e231ea --- /dev/null +++ b/packages/core/confidential/src/zip-hardhat.test.ts @@ -0,0 +1,236 @@ +import type { TestFn, ExecutionContext } from 'ava'; +import _test from 'ava'; + +import { zipHardhat } from './zip-hardhat'; + +import { buildERC20 } from './erc20'; +import { buildERC721 } from './erc721'; +import { buildERC1155 } from './erc1155'; +import { buildCustom } from './custom'; +import { promises as fs } from 'fs'; +import path from 'path'; +import os from 'os'; +import util from 'util'; +import child from 'child_process'; +import type { Contract } from './contract'; +import { rimraf } from 'rimraf'; +import type { JSZipObject } from 'jszip'; +import type JSZip from 'jszip'; +import type { GenericOptions } from './build-generic'; + +interface Context { + tempFolder: string; +} + +const test = _test as TestFn; + +test.beforeEach(async t => { + t.context.tempFolder = await fs.mkdtemp(path.join(os.tmpdir(), 'openzeppelin-wizard-')); +}); + +test.afterEach.always(async t => { + await rimraf(t.context.tempFolder); +}); + +test.serial('erc20 full', async t => { + const opts: GenericOptions = { + kind: 'ERC20', + name: 'My Token', + symbol: 'MTK', + premint: '2000', + access: 'roles', + burnable: true, + mintable: true, + pausable: true, + permit: true, + votes: true, + flashmint: true, + }; + const c = buildERC20(opts); + await runIgnitionTest(c, t, opts); +}); + +test.serial('erc20 ownable, uups, crossChainBridging custom', async t => { + const opts: GenericOptions = { + kind: 'ERC20', + name: 'My Token', + symbol: 'MTK', + premint: '2000', + access: 'ownable', + burnable: true, + mintable: true, + pausable: true, + permit: true, + votes: true, + flashmint: true, + crossChainBridging: 'custom', + premintChainId: '10', + upgradeable: 'uups', + }; + const c = buildERC20(opts); + await runDeployScriptTest(c, t, opts); +}); + +test.serial('erc721 upgradeable', async t => { + const opts: GenericOptions = { + kind: 'ERC721', + name: 'My Token', + symbol: 'MTK', + upgradeable: 'uups', + }; + const c = buildERC721(opts); + await runDeployScriptTest(c, t, opts); +}); + +test.serial('erc1155 basic', async t => { + const opts: GenericOptions = { + kind: 'ERC1155', + name: 'My Token', + uri: 'https://myuri/{id}', + }; + const c = buildERC1155(opts); + await runIgnitionTest(c, t, opts); +}); + +test.serial('custom basic', async t => { + const opts: GenericOptions = { kind: 'Custom', name: 'My Contract' }; + const c = buildCustom(opts); + await runIgnitionTest(c, t, opts); +}); + +test.serial('custom upgradeable', async t => { + const opts: GenericOptions = { + kind: 'Custom', + name: 'My Contract', + upgradeable: 'transparent', + }; + const c = buildCustom(opts); + await runDeployScriptTest(c, t, opts); +}); + +async function runDeployScriptTest(c: Contract, t: ExecutionContext, opts: GenericOptions) { + const zip = await zipHardhat(c, opts); + + assertDeployScriptLayout(zip, c, t); + await extractAndRunDeployScriptPackage(zip, c, t); + await assertDeployScriptContents(zip, c, t); +} + +async function runIgnitionTest(c: Contract, t: ExecutionContext, opts: GenericOptions) { + const zip = await zipHardhat(c, opts); + + assertIgnitionLayout(zip, c, t); + await extractAndRunIgnitionPackage(zip, c, t); + await assertIgnitionContents(zip, c, t); +} + +function assertDeployScriptLayout(zip: JSZip, c: Contract, t: ExecutionContext) { + const sorted = Object.values(zip.files) + .map(f => f.name) + .sort(); + t.deepEqual(sorted, [ + '.gitignore', + 'README.md', + 'contracts/', + `contracts/${c.name}.sol`, + 'hardhat.config.ts', + 'package-lock.json', + 'package.json', + 'scripts/', + 'scripts/deploy.ts', + 'test/', + 'test/test.ts', + 'tsconfig.json', + ]); +} + +function assertIgnitionLayout(zip: JSZip, c: Contract, t: ExecutionContext) { + const sorted = Object.values(zip.files) + .map(f => f.name) + .sort(); + t.deepEqual(sorted, [ + '.gitignore', + 'README.md', + 'contracts/', + `contracts/${c.name}.sol`, + 'hardhat.config.ts', + 'ignition/', + 'ignition/modules/', + `ignition/modules/${c.name}.ts`, + 'package-lock.json', + 'package.json', + 'test/', + 'test/test.ts', + 'tsconfig.json', + ]); +} + +function extractAndRun(makeDeployCommand: (c: Contract) => string | null) { + return async (zip: JSZip, c: Contract, t: ExecutionContext) => { + const files = Object.values(zip.files); + + const tempFolder = t.context.tempFolder; + + const items = Object.values(files); + for (const item of items) { + if (item.dir) { + await fs.mkdir(path.join(tempFolder, item.name)); + } else { + await fs.writeFile(path.join(tempFolder, item.name), await asString(item)); + } + } + + let command = `cd "${tempFolder}" && npm install && npm test`; + if (c.constructorArgs === undefined) { + // only test deploying the contract if there are no constructor args needed + command += ` && ${makeDeployCommand(c)}`; + } + + const exec = util.promisify(child.exec); + const result = await exec(command); + + t.regex(result.stdout, /1 passing/); + if (c.constructorArgs === undefined) { + t.regex(result.stdout, /deployed to/); + } + }; +} + +const extractAndRunDeployScriptPackage = extractAndRun(() => 'npx hardhat run scripts/deploy.ts'); +const extractAndRunIgnitionPackage = extractAndRun(c => `npx hardhat ignition deploy ignition/modules/${c.name}.ts`); + +async function assertDeployScriptContents(zip: JSZip, c: Contract, t: ExecutionContext) { + const contentComparison = [ + await getItemString(zip, `contracts/${c.name}.sol`), + await getItemString(zip, 'hardhat.config.ts'), + await getItemString(zip, 'package.json'), + await getItemString(zip, 'scripts/deploy.ts'), + await getItemString(zip, 'test/test.ts'), + ]; + + t.snapshot(contentComparison); +} + +async function assertIgnitionContents(zip: JSZip, c: Contract, t: ExecutionContext) { + const contentComparison = [ + await getItemString(zip, `contracts/${c.name}.sol`), + await getItemString(zip, 'hardhat.config.ts'), + await getItemString(zip, 'package.json'), + await getItemString(zip, `ignition/modules/${c.name}.ts`), + await getItemString(zip, 'test/test.ts'), + ]; + + t.snapshot(contentComparison); +} + +async function getItemString(zip: JSZip, key: string) { + const obj = zip.files[key]; + if (obj === undefined) { + throw Error(`Item ${key} not found in zip`); + } + return await asString(obj); +} + +async function asString(item: JSZipObject) { + return Buffer.from(await item.async('arraybuffer')).toString(); +} diff --git a/packages/core/confidential/src/zip-hardhat.test.ts.md b/packages/core/confidential/src/zip-hardhat.test.ts.md new file mode 100644 index 000000000..faf4023f1 --- /dev/null +++ b/packages/core/confidential/src/zip-hardhat.test.ts.md @@ -0,0 +1,641 @@ +# Snapshot report for `src/zip-hardhat.test.ts` + +The actual snapshot is saved in `zip-hardhat.test.ts.snap`. + +Generated by [AVA](https://avajs.dev). + +## erc20 full + +> Snapshot 1 + + [ + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";␊ + import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";␊ + import {ERC20Burnable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";␊ + import {ERC20FlashMint} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20FlashMint.sol";␊ + import {ERC20Pausable} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";␊ + import {ERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";␊ + import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";␊ + import {Nonces} from "@openzeppelin/contracts/utils/Nonces.sol";␊ + ␊ + contract MyToken is ERC20, ERC20Burnable, ERC20Pausable, AccessControl, ERC20Permit, ERC20Votes, ERC20FlashMint {␊ + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");␊ + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");␊ + ␊ + constructor(address recipient, address defaultAdmin, address pauser, address minter)␊ + ERC20("My Token", "MTK")␊ + ERC20Permit("My Token")␊ + {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + _grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);␊ + _grantRole(PAUSER_ROLE, pauser);␊ + _grantRole(MINTER_ROLE, minter);␊ + }␊ + ␊ + function pause() public onlyRole(PAUSER_ROLE) {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyRole(PAUSER_ROLE) {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyRole(MINTER_ROLE) {␊ + _mint(to, amount);␊ + }␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20, ERC20Pausable, ERC20Votes)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20Permit, Nonces)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + `, + `import { HardhatUserConfig } from "hardhat/config";␊ + import "@nomicfoundation/hardhat-toolbox";␊ + ␊ + ␊ + const config: HardhatUserConfig = {␊ + solidity: {␊ + version: "0.8.27",␊ + settings: {␊ + optimizer: {␊ + enabled: true,␊ + },␊ + },␊ + },␊ + };␊ + ␊ + export default config;␊ + `, + `{␊ + "name": "hardhat-sample",␊ + "version": "0.0.1",␊ + "description": "",␊ + "main": "index.js",␊ + "scripts": {␊ + "test": "hardhat test"␊ + },␊ + "author": "",␊ + "license": "MIT",␊ + "devDependencies": {␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ + "hardhat": "^2.16.1"␊ + }␊ + }`, + `import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";␊ + ␊ + export default buildModule("MyTokenModule", (m) => {␊ + ␊ + // TODO: Set addresses for the contract arguments below␊ + const myToken = m.contract("MyToken", [recipient, defaultAdmin, pauser, minter]);␊ + ␊ + return { myToken };␊ + });␊ + `, + `import { expect } from "chai";␊ + import { ethers } from "hardhat";␊ + ␊ + describe("MyToken", function () {␊ + it("Test contract", async function () {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + const recipient = (await ethers.getSigners())[0].address;␊ + const defaultAdmin = (await ethers.getSigners())[1].address;␊ + const pauser = (await ethers.getSigners())[2].address;␊ + const minter = (await ethers.getSigners())[3].address;␊ + ␊ + const instance = await ContractFactory.deploy(recipient, defaultAdmin, pauser, minter);␊ + await instance.waitForDeployment();␊ + ␊ + expect(await instance.name()).to.equal("My Token");␊ + });␊ + });␊ + `, + ] + +## erc20 ownable, uups, crossChainBridging custom + +> Snapshot 1 + + [ + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC20Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";␊ + import {ERC20BridgeableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20BridgeableUpgradeable.sol";␊ + import {ERC20BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20BurnableUpgradeable.sol";␊ + import {ERC20FlashMintUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20FlashMintUpgradeable.sol";␊ + import {ERC20PausableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PausableUpgradeable.sol";␊ + import {ERC20PermitUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol";␊ + import {ERC20VotesUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20VotesUpgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC20Upgradeable, ERC20BridgeableUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, OwnableUpgradeable, ERC20PermitUpgradeable, ERC20VotesUpgradeable, ERC20FlashMintUpgradeable, UUPSUpgradeable {␊ + address public tokenBridge;␊ + error Unauthorized();␊ + ␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address tokenBridge_, address recipient, address initialOwner)␊ + public initializer␊ + {␊ + __ERC20_init("My Token", "MTK");␊ + __ERC20Bridgeable_init();␊ + __ERC20Burnable_init();␊ + __ERC20Pausable_init();␊ + __Ownable_init(initialOwner);␊ + __ERC20Permit_init("My Token");␊ + __ERC20Votes_init();␊ + __ERC20FlashMint_init();␊ + __UUPSUpgradeable_init();␊ + ␊ + require(tokenBridge_ != address(0), "Invalid tokenBridge_ address");␊ + tokenBridge = tokenBridge_;␊ + if (block.chainid == 10) {␊ + _mint(recipient, 2000 * 10 ** decimals());␊ + }␊ + }␊ + ␊ + function _checkTokenBridge(address caller) internal view override {␊ + if (caller != tokenBridge) revert Unauthorized();␊ + }␊ + ␊ + function pause() public onlyOwner {␊ + _pause();␊ + }␊ + ␊ + function unpause() public onlyOwner {␊ + _unpause();␊ + }␊ + ␊ + function mint(address to, uint256 amount) public onlyOwner {␊ + _mint(to, amount);␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + ␊ + // The following functions are overrides required by Solidity.␊ + ␊ + function _update(address from, address to, uint256 value)␊ + internal␊ + override(ERC20Upgradeable, ERC20PausableUpgradeable, ERC20VotesUpgradeable)␊ + {␊ + super._update(from, to, value);␊ + }␊ + ␊ + function nonces(address owner)␊ + public␊ + view␊ + override(ERC20PermitUpgradeable, NoncesUpgradeable)␊ + returns (uint256)␊ + {␊ + return super.nonces(owner);␊ + }␊ + }␊ + `, + `import { HardhatUserConfig } from "hardhat/config";␊ + import "@nomicfoundation/hardhat-toolbox";␊ + import "@openzeppelin/hardhat-upgrades";␊ + ␊ + const config: HardhatUserConfig = {␊ + solidity: {␊ + version: "0.8.27",␊ + settings: {␊ + optimizer: {␊ + enabled: true,␊ + },␊ + },␊ + },␊ + };␊ + ␊ + export default config;␊ + `, + `{␊ + "name": "hardhat-sample",␊ + "version": "0.0.1",␊ + "description": "",␊ + "main": "index.js",␊ + "scripts": {␊ + "test": "hardhat test"␊ + },␊ + "author": "",␊ + "license": "MIT",␊ + "devDependencies": {␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@openzeppelin/contracts-upgradeable": "^5.4.0",␊ + "@openzeppelin/hardhat-upgrades": "^3.0.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ + "hardhat": "^2.16.1"␊ + }␊ + }`, + `import { ethers, upgrades } from "hardhat";␊ + ␊ + async function main() {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + // TODO: Set addresses for the contract arguments below␊ + const instance = await upgrades.deployProxy(ContractFactory, [tokenBridge_, recipient, initialOwner]);␊ + await instance.waitForDeployment();␊ + ␊ + console.log(\`Proxy deployed to ${await instance.getAddress()}\`);␊ + }␊ + ␊ + // We recommend this pattern to be able to use async/await everywhere␊ + // and properly handle errors.␊ + main().catch((error) => {␊ + console.error(error);␊ + process.exitCode = 1;␊ + });␊ + `, + `import { expect } from "chai";␊ + import { ethers, upgrades } from "hardhat";␊ + ␊ + describe("MyToken", function () {␊ + it("Test contract", async function () {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + const tokenBridge_ = (await ethers.getSigners())[0].address;␊ + const recipient = (await ethers.getSigners())[1].address;␊ + const initialOwner = (await ethers.getSigners())[2].address;␊ + ␊ + const instance = await upgrades.deployProxy(ContractFactory, [tokenBridge_, recipient, initialOwner]);␊ + await instance.waitForDeployment();␊ + ␊ + expect(await instance.name()).to.equal("My Token");␊ + });␊ + });␊ + `, + ] + +## erc721 upgradeable + +> Snapshot 1 + + [ + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";␊ + import {UUPSUpgradeable} from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";␊ + ␊ + contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + ␊ + function initialize(address initialOwner) public initializer {␊ + __ERC721_init("My Token", "MTK");␊ + __Ownable_init(initialOwner);␊ + __UUPSUpgradeable_init();␊ + }␊ + ␊ + function _authorizeUpgrade(address newImplementation)␊ + internal␊ + override␊ + onlyOwner␊ + {}␊ + }␊ + `, + `import { HardhatUserConfig } from "hardhat/config";␊ + import "@nomicfoundation/hardhat-toolbox";␊ + import "@openzeppelin/hardhat-upgrades";␊ + ␊ + const config: HardhatUserConfig = {␊ + solidity: {␊ + version: "0.8.27",␊ + settings: {␊ + optimizer: {␊ + enabled: true,␊ + },␊ + },␊ + },␊ + };␊ + ␊ + export default config;␊ + `, + `{␊ + "name": "hardhat-sample",␊ + "version": "0.0.1",␊ + "description": "",␊ + "main": "index.js",␊ + "scripts": {␊ + "test": "hardhat test"␊ + },␊ + "author": "",␊ + "license": "MIT",␊ + "devDependencies": {␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@openzeppelin/contracts-upgradeable": "^5.4.0",␊ + "@openzeppelin/hardhat-upgrades": "^3.0.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ + "hardhat": "^2.16.1"␊ + }␊ + }`, + `import { ethers, upgrades } from "hardhat";␊ + ␊ + async function main() {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + // TODO: Set addresses for the contract arguments below␊ + const instance = await upgrades.deployProxy(ContractFactory, [initialOwner]);␊ + await instance.waitForDeployment();␊ + ␊ + console.log(\`Proxy deployed to ${await instance.getAddress()}\`);␊ + }␊ + ␊ + // We recommend this pattern to be able to use async/await everywhere␊ + // and properly handle errors.␊ + main().catch((error) => {␊ + console.error(error);␊ + process.exitCode = 1;␊ + });␊ + `, + `import { expect } from "chai";␊ + import { ethers, upgrades } from "hardhat";␊ + ␊ + describe("MyToken", function () {␊ + it("Test contract", async function () {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + const initialOwner = (await ethers.getSigners())[0].address;␊ + ␊ + const instance = await upgrades.deployProxy(ContractFactory, [initialOwner]);␊ + await instance.waitForDeployment();␊ + ␊ + expect(await instance.name()).to.equal("My Token");␊ + });␊ + });␊ + `, + ] + +## erc1155 basic + +> Snapshot 1 + + [ + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";␊ + import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";␊ + ␊ + contract MyToken is ERC1155, Ownable {␊ + constructor(address initialOwner)␊ + ERC1155("https://myuri/{id}")␊ + Ownable(initialOwner)␊ + {}␊ + ␊ + function setURI(string memory newuri) public onlyOwner {␊ + _setURI(newuri);␊ + }␊ + }␊ + `, + `import { HardhatUserConfig } from "hardhat/config";␊ + import "@nomicfoundation/hardhat-toolbox";␊ + ␊ + ␊ + const config: HardhatUserConfig = {␊ + solidity: {␊ + version: "0.8.27",␊ + settings: {␊ + optimizer: {␊ + enabled: true,␊ + },␊ + },␊ + },␊ + };␊ + ␊ + export default config;␊ + `, + `{␊ + "name": "hardhat-sample",␊ + "version": "0.0.1",␊ + "description": "",␊ + "main": "index.js",␊ + "scripts": {␊ + "test": "hardhat test"␊ + },␊ + "author": "",␊ + "license": "MIT",␊ + "devDependencies": {␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ + "hardhat": "^2.16.1"␊ + }␊ + }`, + `import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";␊ + ␊ + export default buildModule("MyTokenModule", (m) => {␊ + ␊ + // TODO: Set addresses for the contract arguments below␊ + const myToken = m.contract("MyToken", [initialOwner]);␊ + ␊ + return { myToken };␊ + });␊ + `, + `import { expect } from "chai";␊ + import { ethers } from "hardhat";␊ + ␊ + describe("MyToken", function () {␊ + it("Test contract", async function () {␊ + const ContractFactory = await ethers.getContractFactory("MyToken");␊ + ␊ + const initialOwner = (await ethers.getSigners())[0].address;␊ + ␊ + const instance = await ContractFactory.deploy(initialOwner);␊ + await instance.waitForDeployment();␊ + ␊ + expect(await instance.uri(0)).to.equal("https://myuri/{id}");␊ + });␊ + });␊ + `, + ] + +## custom basic + +> Snapshot 1 + + [ + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + contract MyContract {␊ + }␊ + `, + `import { HardhatUserConfig } from "hardhat/config";␊ + import "@nomicfoundation/hardhat-toolbox";␊ + ␊ + ␊ + const config: HardhatUserConfig = {␊ + solidity: {␊ + version: "0.8.27",␊ + settings: {␊ + optimizer: {␊ + enabled: true,␊ + },␊ + },␊ + },␊ + };␊ + ␊ + export default config;␊ + `, + `{␊ + "name": "hardhat-sample",␊ + "version": "0.0.1",␊ + "description": "",␊ + "main": "index.js",␊ + "scripts": {␊ + "test": "hardhat test"␊ + },␊ + "author": "",␊ + "license": "MIT",␊ + "devDependencies": {␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ + "hardhat": "^2.16.1"␊ + }␊ + }`, + `import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";␊ + ␊ + export default buildModule("MyContractModule", (m) => {␊ + ␊ + ␊ + const myContract = m.contract("MyContract", []);␊ + ␊ + return { myContract };␊ + });␊ + `, + `import { expect } from "chai";␊ + import { ethers } from "hardhat";␊ + ␊ + describe("MyContract", function () {␊ + it("Test contract", async function () {␊ + const ContractFactory = await ethers.getContractFactory("MyContract");␊ + ␊ + const instance = await ContractFactory.deploy();␊ + await instance.waitForDeployment();␊ + });␊ + });␊ + `, + ] + +## custom upgradeable + +> Snapshot 1 + + [ + `// SPDX-License-Identifier: MIT␊ + // Compatible with OpenZeppelin Contracts ^5.4.0␊ + pragma solidity ^0.8.27;␊ + ␊ + import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";␊ + ␊ + contract MyContract is Initializable {␊ + /// @custom:oz-upgrades-unsafe-allow constructor␊ + constructor() {␊ + _disableInitializers();␊ + }␊ + }␊ + `, + `import { HardhatUserConfig } from "hardhat/config";␊ + import "@nomicfoundation/hardhat-toolbox";␊ + import "@openzeppelin/hardhat-upgrades";␊ + ␊ + const config: HardhatUserConfig = {␊ + solidity: {␊ + version: "0.8.27",␊ + settings: {␊ + optimizer: {␊ + enabled: true,␊ + },␊ + },␊ + },␊ + };␊ + ␊ + export default config;␊ + `, + `{␊ + "name": "hardhat-sample",␊ + "version": "0.0.1",␊ + "description": "",␊ + "main": "index.js",␊ + "scripts": {␊ + "test": "hardhat test"␊ + },␊ + "author": "",␊ + "license": "MIT",␊ + "devDependencies": {␊ + "@openzeppelin/contracts": "^5.4.0",␊ + "@openzeppelin/contracts-upgradeable": "^5.4.0",␊ + "@openzeppelin/hardhat-upgrades": "^3.0.0",␊ + "@nomicfoundation/hardhat-toolbox": "^6.1.0",␊ + "hardhat": "^2.16.1"␊ + }␊ + }`, + `import { ethers, upgrades } from "hardhat";␊ + ␊ + async function main() {␊ + const ContractFactory = await ethers.getContractFactory("MyContract");␊ + ␊ + ␊ + const instance = await upgrades.deployProxy(ContractFactory, []);␊ + await instance.waitForDeployment();␊ + ␊ + console.log(\`Proxy deployed to ${await instance.getAddress()}\`);␊ + }␊ + ␊ + // We recommend this pattern to be able to use async/await everywhere␊ + // and properly handle errors.␊ + main().catch((error) => {␊ + console.error(error);␊ + process.exitCode = 1;␊ + });␊ + `, + `import { expect } from "chai";␊ + import { ethers, upgrades } from "hardhat";␊ + ␊ + describe("MyContract", function () {␊ + it("Test contract", async function () {␊ + const ContractFactory = await ethers.getContractFactory("MyContract");␊ + ␊ + const instance = await upgrades.deployProxy(ContractFactory, []);␊ + await instance.waitForDeployment();␊ + });␊ + });␊ + `, + ] diff --git a/packages/core/confidential/src/zip-hardhat.test.ts.snap b/packages/core/confidential/src/zip-hardhat.test.ts.snap new file mode 100644 index 0000000000000000000000000000000000000000..024a4cbe3787b3ce87fa0e039543d283a5a04466 GIT binary patch literal 2824 zcmV+j3-|OvRzVOm!xQ&ek3~JNBfsa4 z6LBnkLLZ9=00000000B+Tg`7Aw-x95JDU$TNP1@%JQCiH<=Te;fO`Od-`xP<&u;(#-UQ&ow*Yvra_!y9)g{i+pi;?xyLs~_ zs8m7aDyX~#-m6>!?^iB^%GGx-wQe+N1Y^x=|P8gT)U?~W&5PBes4q=zG7}h>w38v32YBR`Cn@9^cN5=SqMYV+-@BWkJPU|=v z$(~`_)S~8J7s$PoQ?wJ|X~6Kl#8ePQMRNqhh5sNzqQ6F{Jk10-h--$&C>5t&L5AVP z$2=ydQr{rBuz$`Z7N>#M043x{j0VS}rjkUWX=E)xHS2|IgH1IlBm(Mb8gOKz?PF%O z1|0F#tXHqvK4?Ad@A+=RgDQj&?hGUrA9P@n?nESj0i!}9D&ga$t&RInwx6s&ybl-Q zGaLlyS?Bg0uU6=&)fbM$SX+Ix>BJ~>C=3mvNAWa}jC&{yITiwP9FT-yDjP6s3UL>u zkz5L6LWivhN(JV_=a^85d0hjmKYHn2ZEXOxX=@EwTig6utt4QKRuD7&2f5U?!u1MT zby}?!yan4WcPpDGelH)S!6vY`++d2IZ;h#Z_B*H&{xih08~{0kw^@jg+hb zQ$l6u_8o{~mQp!BPhsKpvCUEdcHqc#%_iLJW7uU;#P$g7 za2&#&0o<@b#xJS7ohBiYIM-So{-HA#*RYGC6c61_?-E5(-jL1f6;J-~s1J{G*)>I) zVD4v%7zNbCWw#$wQ4o1a7}C6^4q30#3JA%k+#P)#)#-ALPNaoe#M9`Z1_#IXw?)dHD z2rHmFI)3|(-_|-;4>O})&Wu_g`rb}TqHv9cX@qmHn>aP;QKB1SJwVjPH?n}I0+5bB z=CRg*UR;NZKY<78{HlvRF<8JZ<52c7%(Do@dufcR6mSPeOdVb0*0Iel z7GdmX!ugD~27FowZ==CB3$iA*d~5=@J;Mh%?%_i9us(FiE1B)SxRl!t?f!gWEJ+NfA4y(@=?YwgUKwM9^eE;kIe6Oo*tZ+EP#9e__Avl$CxF?XV}^E| zL(P^RGxUSP(85@vv%LW4b}L!S4{;K)fp;a$t%gL zd(W%aeaU?Md5WT9Ql}q(ZWI zyjuSLUtHDl-`)n`t(yS+^Lqez?@e1RleaIRTGkPLE9r3*;uBPMbLmiYyyz|9IO|_! zRo#0A6BeqokfW}gn>@u)wfNa;G70*~YW*BkaA6-+&!2+|4(Q1h|9Q+`2A;?XoWta0 z+|t~uDnCFGc|Pr&31|BQODBwgIBAI&Tv(BbqCF(qAi2?X z?%^(9NiI{M3v#`;hXuHUMzUkqT_tY;n3oBlZEe|YCE=ix7RrJ{uP{R#64o~+^=BU9 z=(m1idPWvBj-oxMtoFE^_M}OwxI(+Yql+Z@}6r-9-@z zN47DOC~8~ihl?Z9LmASAo_^cmtNMbH5H2plcB|-Y@Wm*-L#H=x2Ynno+Z^hWJ7s{P z2=jVQ_Gl_4r%(#|D3y({vP@xFb;$89=5p)+x)gEHaoQ_R$LNhgoFR)hhJ7S+H?(+e z3+s9Ld=&4kDxO0X3c3C8|yBluhu? zh-^D8|2aliWvj6~)nip9cqJto@abr3Sx6X)nb*hqN;x5SrSxGD_9NEwKGoAgqXJeL z5d7gm38#nUlFgRtho33}tEvc~UtpyTi(^bfDEmac4V5ZPD3Bctb(Sv~Oa(SXXwzDJ z7xTehA9Jiw5Dj6%S%P^qfPF;62%Dr|_*Juset=}q_dMNd`RL&ybgS)CHb^*A1)Y!g ziCku(GIx6dGrT_~GkmlIzTzD5NNW2cH1SDEW;aJ%bk-@D;-l!^vp+vCoBidO2X{Md zSh$nN3EnsV;39apt^n|-s{nj*9e}Uin3mwJT)7y6_im?sT8`^(r`;SwdfBYj>q9w> z+S$z!xtX0;iJloDDI9D|nQ6J(X`h5@IT;Z$iK4j3(sEXK%nFZL;o&Yk?#v1gojA?v zi&NGY|Eau2^~Dqke(P)#{EN@yW6Xng`}S?Pg9Hi2Q~2xuaHa4ME&&i<2H@{k0QlzW zv?=_5D;JZ(t973E+jS+J{dA|$C;V>_R{EGv*3~q5iduB@(&ydomv9!qtM#Q!#C)?E z4^mE=2P8Z!e6VfNy>X0#axy2d+(>O=>x|O!MLCzo!iUv!H*(N1Tr8`jjy~<-}`^#CX@e?}+x1AvGoi`>S8L zg8kP3fNv`RY+MFl@yfKp{yF{1qb;N`yun6cV3R(r;3y94I`Di_acmoENOGt@Iy`UP0& a?Q>(LzdM=5RQ@$>s_}mwQrqqAMgRb{m4E2~ literal 0 HcmV?d00001 diff --git a/packages/core/confidential/src/zip-hardhat.ts b/packages/core/confidential/src/zip-hardhat.ts new file mode 100644 index 000000000..490a693b9 --- /dev/null +++ b/packages/core/confidential/src/zip-hardhat.ts @@ -0,0 +1,232 @@ +import JSZip from 'jszip'; +import type { GenericOptions } from './build-generic'; +import type { Contract } from './contract'; +import { printContract } from './print'; +import SOLIDITY_VERSION from './solidity-version.json'; +import type { Lines } from './utils/format-lines'; +import { formatLinesWithSpaces, spaceBetween } from './utils/format-lines'; + +const hardhatConfig = (upgradeable: boolean) => `\ +import { HardhatUserConfig } from "hardhat/config"; +import "@nomicfoundation/hardhat-toolbox"; +${upgradeable ? `import "@openzeppelin/hardhat-upgrades";` : ''} + +const config: HardhatUserConfig = { + solidity: { + version: "${SOLIDITY_VERSION}", + settings: { + optimizer: { + enabled: true, + }, + }, + }, +}; + +export default config; +`; + +const tsConfig = `\ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + } +} +`; + +const gitIgnore = `\ +node_modules +.env +coverage +coverage.json +typechain +typechain-types + +# Hardhat files +cache +artifacts +`; + +const test = (c: Contract, opts?: GenericOptions) => { + return formatLinesWithSpaces(2, ...spaceBetween(getImports(c), getTestCase(c))); + + function getTestCase(c: Contract) { + const args = getAddressArgs(c); + return [ + `describe("${c.name}", function () {`, + [ + 'it("Test contract", async function () {', + spaceBetween( + [`const ContractFactory = await ethers.getContractFactory("${c.name}");`], + getAddressVariables(args), + [`const instance = await ${getDeploymentCall(c, args)};`, 'await instance.waitForDeployment();'], + getExpects(), + ), + '});', + ], + '});', + ]; + } + + function getImports(c: Contract) { + return ['import { expect } from "chai";', `import { ${getHardhatPlugins(c).join(', ')} } from "hardhat";`]; + } + + function getExpects(): Lines[] { + if (opts !== undefined) { + switch (opts.kind) { + case 'ERC20': + case 'ERC721': + return [`expect(await instance.name()).to.equal("${opts.name}");`]; + + case 'ERC1155': + return [`expect(await instance.uri(0)).to.equal("${opts.uri}");`]; + + case 'Governor': + case 'Custom': + break; + + default: + throw new Error('Unknown ERC'); + } + } + return []; + } + + function getAddressVariables(args: string[]): Lines[] { + const vars = []; + for (let i = 0; i < args.length; i++) { + vars.push(`const ${args[i]} = (await ethers.getSigners())[${i}].address;`); + } + return vars; + } +}; + +function getAddressArgs(c: Contract): string[] { + const args = []; + for (const constructorArg of c.constructorArgs) { + if (constructorArg.type === 'address') { + args.push(constructorArg.name); + } + } + return args; +} + +function getDeploymentCall(c: Contract, args: string[]): string { + return c.upgradeable + ? `upgrades.deployProxy(ContractFactory, [${args.join(', ')}])` + : `ContractFactory.deploy(${args.join(', ')})`; +} + +const script = (c: Contract) => { + const args = getAddressArgs(c); + return `\ +import { ${getHardhatPlugins(c).join(', ')} } from "hardhat"; + +async function main() { + const ContractFactory = await ethers.getContractFactory("${c.name}"); + + ${args.length > 0 ? '// TODO: Set addresses for the contract arguments below' : ''} + const instance = await ${getDeploymentCall(c, args)}; + await instance.waitForDeployment(); + + console.log(\`${c.upgradeable ? 'Proxy' : 'Contract'} deployed to \${await instance.getAddress()}\`); +} + +// We recommend this pattern to be able to use async/await everywhere +// and properly handle errors. +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); +`; +}; + +const lowerFirstCharacter = (str: string) => str.charAt(0).toLowerCase() + str.slice(1); + +const ignitionModule = (c: Contract) => { + const deployArguments = getAddressArgs(c); + const contractVariableName = lowerFirstCharacter(c.name); + + return `import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("${c.name}Module", (m) => { + + ${deployArguments.length > 0 ? '// TODO: Set addresses for the contract arguments below' : ''} + const ${contractVariableName} = m.contract("${c.name}", [${deployArguments.join(', ')}]); + + return { ${contractVariableName} }; +}); +`; +}; + +const readme = (c: Contract) => `\ +# Sample Hardhat Project + +This project demonstrates a basic Hardhat use case. It comes with a contract generated by [OpenZeppelin Wizard](https://wizard.openzeppelin.com/), a test for that contract, ${c.upgradeable ? 'and a script that deploys that contract' : 'and a Hardhat Ignition module that deploys that contract'}. + +## Installing dependencies + +\`\`\` +npm install +\`\`\` + +## Testing the contract + +\`\`\` +npm test +\`\`\` + +## Deploying the contract + +You can target any network from your Hardhat config using: + +\`\`\` +${c.upgradeable ? 'npx hardhat run --network scripts/deploy.ts' : `npx hardhat ignition deploy ignition/modules/${c.name}.ts --network `} +\`\`\` +`; + +function getHardhatPlugins(c: Contract) { + const plugins = ['ethers']; + if (c.upgradeable) { + plugins.push('upgrades'); + } + return plugins; +} + +export async function zipHardhat(c: Contract, opts?: GenericOptions) { + const zip = new JSZip(); + + const { default: packageJson } = c.upgradeable + ? await import('./environments/hardhat/upgradeable/package.json') + : await import('./environments/hardhat/package.json'); + packageJson.license = c.license; + + const { default: packageLock } = c.upgradeable + ? await import('./environments/hardhat/upgradeable/package-lock.json') + : await import('./environments/hardhat/package-lock.json'); + packageLock.packages[''].license = c.license; + + zip.file(`contracts/${c.name}.sol`, printContract(c)); + zip.file('test/test.ts', test(c, opts)); + + if (c.upgradeable) { + zip.file('scripts/deploy.ts', script(c)); + } else { + zip.file(`ignition/modules/${c.name}.ts`, ignitionModule(c)); + } + + zip.file('.gitignore', gitIgnore); + zip.file('hardhat.config.ts', hardhatConfig(c.upgradeable)); + zip.file('package.json', JSON.stringify(packageJson, null, 2)); + zip.file(`package-lock.json`, JSON.stringify(packageLock, null, 2)); + zip.file('README.md', readme(c)); + zip.file('tsconfig.json', tsConfig); + + return zip; +} diff --git a/packages/core/confidential/tsconfig.json b/packages/core/confidential/tsconfig.json new file mode 100644 index 000000000..68fb5fd5e --- /dev/null +++ b/packages/core/confidential/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "incremental": true, + "module": "commonjs", + "sourceMap": true, + "declaration": true, + "declarationMap": true, + "skipLibCheck": true, + "rootDir": "src", + "outDir": "dist" + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/packages/core/confidential/zip-env-foundry.js b/packages/core/confidential/zip-env-foundry.js new file mode 100644 index 000000000..836eb4d8e --- /dev/null +++ b/packages/core/confidential/zip-env-foundry.js @@ -0,0 +1 @@ +module.exports = require('./dist/zip-foundry'); diff --git a/packages/core/confidential/zip-env-foundry.ts b/packages/core/confidential/zip-env-foundry.ts new file mode 100644 index 000000000..b28db5f46 --- /dev/null +++ b/packages/core/confidential/zip-env-foundry.ts @@ -0,0 +1 @@ +export * from './src/zip-foundry'; diff --git a/packages/core/confidential/zip-env-hardhat.js b/packages/core/confidential/zip-env-hardhat.js new file mode 100644 index 000000000..2d13c70df --- /dev/null +++ b/packages/core/confidential/zip-env-hardhat.js @@ -0,0 +1 @@ +module.exports = require('./dist/zip-hardhat'); diff --git a/packages/core/confidential/zip-env-hardhat.ts b/packages/core/confidential/zip-env-hardhat.ts new file mode 100644 index 000000000..8786bfeae --- /dev/null +++ b/packages/core/confidential/zip-env-hardhat.ts @@ -0,0 +1 @@ +export * from './src/zip-hardhat'; diff --git a/packages/ui/public/index.html b/packages/ui/public/index.html index 31c02c322..ddbd06966 100644 --- a/packages/ui/public/index.html +++ b/packages/ui/public/index.html @@ -99,6 +99,7 @@ cairoCairo stellarStellar stylusStylus + zamaZama

diff --git a/packages/ui/public/zama.html b/packages/ui/public/zama.html new file mode 100644 index 000000000..b1c9c7be3 --- /dev/null +++ b/packages/ui/public/zama.html @@ -0,0 +1,99 @@ + + + + + + OpenZeppelin Contracts Wizard + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ Forum + Docs + GitHub OpenZeppelin + Twitter/X +
+
+ + +
+ +
+ + + + + + + + + + + + + diff --git a/packages/ui/src/confidential/AccessControlSection.svelte b/packages/ui/src/confidential/AccessControlSection.svelte new file mode 100644 index 000000000..35ec01511 --- /dev/null +++ b/packages/ui/src/confidential/AccessControlSection.svelte @@ -0,0 +1,62 @@ + + + +
+ + + +
+
diff --git a/packages/ui/src/confidential/AccountControls.svelte b/packages/ui/src/confidential/AccountControls.svelte new file mode 100644 index 000000000..8a490a66f --- /dev/null +++ b/packages/ui/src/confidential/AccountControls.svelte @@ -0,0 +1,215 @@ + + +
+
+ * Experimental: + Some of the following features are not audited and are subject to change +
+
+ +
+

Settings

+ + +
+ +
+

Features

+ +
+ + + + + + + +
+
+ + +
+ + + + + + +
+
+ + diff --git a/packages/ui/src/confidential/App.svelte b/packages/ui/src/confidential/App.svelte new file mode 100644 index 000000000..94525b674 --- /dev/null +++ b/packages/ui/src/confidential/App.svelte @@ -0,0 +1,528 @@ + + +
+ + +
+
+ + + + + + + + + + +
+ + {#if hasErrors} + + {:else} +
+ + + {#if showButtons.openInRemix} + + +
+ Transparent upgradeable contracts are not supported on Remix. Try using Remix with UUPS upgradability or + use Hardhat or Foundry with + OpenZeppelin Upgrades. +
+ + Open in Remix anyway. +
+
+ {/if} + + + + + + + {#if showButtons.downloadHardhat} + + {/if} + + {#if showButtons.downloadFoundry} + + {/if} + +
+ {/if} +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+        {#if showCode}
+          {@html highlightedCode}
+        {/if}
+      
+
+
+
+ + diff --git a/packages/ui/src/confidential/CustomControls.svelte b/packages/ui/src/confidential/CustomControls.svelte new file mode 100644 index 000000000..bb54fd2f5 --- /dev/null +++ b/packages/ui/src/confidential/CustomControls.svelte @@ -0,0 +1,48 @@ + + +
+

Settings

+ + +
+ +
+

Features

+ +
+ +
+
+ + + + + + diff --git a/packages/ui/src/confidential/ERC1155Controls.svelte b/packages/ui/src/confidential/ERC1155Controls.svelte new file mode 100644 index 000000000..5ac4ac1b7 --- /dev/null +++ b/packages/ui/src/confidential/ERC1155Controls.svelte @@ -0,0 +1,82 @@ + + +
+

Settings

+ + + +
+ +
+

Features

+ +
+ + + + + +
+
+ + + + + + diff --git a/packages/ui/src/confidential/ERC20Controls.svelte b/packages/ui/src/confidential/ERC20Controls.svelte new file mode 100644 index 000000000..c52fd3b9a --- /dev/null +++ b/packages/ui/src/confidential/ERC20Controls.svelte @@ -0,0 +1,201 @@ + + +
+

Settings

+ +
+ + + +
+ + + + {#if showChainId} +

+ + Chain ID of the network on which to premint tokens. +

+ {/if} +
+ +
+

Features

+ +
+ + + + + + + + + + + +
+
+ + +
+ + +
+
+ + +
+ + + +
+
+ + + + + + diff --git a/packages/ui/src/confidential/ERC721Controls.svelte b/packages/ui/src/confidential/ERC721Controls.svelte new file mode 100644 index 000000000..f96cad115 --- /dev/null +++ b/packages/ui/src/confidential/ERC721Controls.svelte @@ -0,0 +1,134 @@ + + +
+

Settings

+ +
+ + +
+ +
+ +
+

Features

+ +
+ + + + + + +
+
+ + +
+ + +
+
+ + + + + + diff --git a/packages/ui/src/confidential/GovernorControls.svelte b/packages/ui/src/confidential/GovernorControls.svelte new file mode 100644 index 000000000..f73869c24 --- /dev/null +++ b/packages/ui/src/confidential/GovernorControls.svelte @@ -0,0 +1,260 @@ + + +
+

Settings

+ + + +
+ + + +
+ + + + + +

+ + Token amounts above will be extended with this number of zeroes. Does not apply to ERC721Votes. +

+ +
+ + + +
+
+ +
+

Votes

+ +
+ + + +
+
+ +
+

+ + +

+ +
+ +

+ + + Assumed block time for converting voting time periods into block numbers. +
+ Block time may drift and impact these periods in the future. +
+

+ + +
+
+ + +
+ + + +
+
+ + + + diff --git a/packages/ui/src/confidential/InfoSection.svelte b/packages/ui/src/confidential/InfoSection.svelte new file mode 100644 index 000000000..7b7052f68 --- /dev/null +++ b/packages/ui/src/confidential/InfoSection.svelte @@ -0,0 +1,32 @@ + + +
+

+ + +

+ + + + +
diff --git a/packages/ui/src/confidential/RealWorldAssetControls.svelte b/packages/ui/src/confidential/RealWorldAssetControls.svelte new file mode 100644 index 000000000..a3ff3d6ec --- /dev/null +++ b/packages/ui/src/confidential/RealWorldAssetControls.svelte @@ -0,0 +1,236 @@ + + +
+
+ * Experimental: + Some of the following features are not audited and are subject to change +
+
+ +
+

Settings

+ +
+ + + +
+ + + + {#if showChainId} +

+ + Chain ID of the network on which to premint tokens. +

+ {/if} +
+ +
+

Features

+ +
+ + + + + + + + + + + + + +
+
+ + +
+ + +
+
+ + +
+ + +
+
+ + +
+ + + +
+
+ + + + diff --git a/packages/ui/src/confidential/StablecoinControls.svelte b/packages/ui/src/confidential/StablecoinControls.svelte new file mode 100644 index 000000000..894b63074 --- /dev/null +++ b/packages/ui/src/confidential/StablecoinControls.svelte @@ -0,0 +1,233 @@ + + +
+
+ * Experimental: + Some of the following features are not audited and are subject to change +
+
+ +
+

Settings

+ +
+ + + +
+ + + + {#if showChainId} +

+ + Chain ID of the network on which to premint tokens. +

+ {/if} +
+ +
+

Features

+ +
+ + + + + + + + + + + + + +
+
+ + +
+ + +
+
+ + +
+ + +
+
+ + +
+ + + +
+
+ + + + diff --git a/packages/ui/src/confidential/UpgradeabilitySection.svelte b/packages/ui/src/confidential/UpgradeabilitySection.svelte new file mode 100644 index 000000000..518a6e676 --- /dev/null +++ b/packages/ui/src/confidential/UpgradeabilitySection.svelte @@ -0,0 +1,35 @@ + + + +
+ + +
+
diff --git a/packages/ui/src/confidential/highlightjs.ts b/packages/ui/src/confidential/highlightjs.ts new file mode 100644 index 000000000..5772decd1 --- /dev/null +++ b/packages/ui/src/confidential/highlightjs.ts @@ -0,0 +1,7 @@ +import hljs from 'highlight.js/lib/core'; + +// @ts-expect-error missing type declaration file +import hljsDefineSolidity from 'highlightjs-solidity'; +hljsDefineSolidity(hljs); + +export default hljs; diff --git a/packages/ui/src/confidential/inject-hyperlinks.ts b/packages/ui/src/confidential/inject-hyperlinks.ts new file mode 100644 index 000000000..2a15e21c8 --- /dev/null +++ b/packages/ui/src/confidential/inject-hyperlinks.ts @@ -0,0 +1,33 @@ +import { version as contractsVersion } from '@openzeppelin/contracts/package.json'; + +export function injectHyperlinks(code: string) { + // We are modifying HTML, so use HTML escaped chars. The pattern excludes paths that include /../ in the URL. + const importContractsRegex = + /"(@openzeppelin\/)(contracts-upgradeable\/|contracts\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)"/g; + const importCommunityContractsRegex = + /"(@openzeppelin\/)(community-contracts\/)((?:(?!\.\.)[^/]+\/)*?[^/]*?)"/g; + + const compatibleCommunityContractsRegexSingle = /Community Contracts commit ([a-fA-F0-9]{7,40})/; + const compatibleCommunityContractsRegexGlobal = new RegExp(compatibleCommunityContractsRegexSingle.source, 'g'); + + const compatibleCommunityContractsGitCommit = code.match(compatibleCommunityContractsRegexSingle)?.[1]; + + let result = code.replace( + importContractsRegex, + `"$1$2$3"`, + ); + + if (compatibleCommunityContractsGitCommit !== undefined) { + result = result + .replace( + importCommunityContractsRegex, + `"$1$2$3"`, + ) + .replace( + compatibleCommunityContractsRegexGlobal, + `Community Contracts commit $1`, + ); + } + + return result; +} diff --git a/packages/ui/src/confidential/remix.ts b/packages/ui/src/confidential/remix.ts new file mode 100644 index 000000000..d91542cd7 --- /dev/null +++ b/packages/ui/src/confidential/remix.ts @@ -0,0 +1,15 @@ +export function remixURL(code: string, upgradeable = false): URL { + const remix = new URL('https://remix.ethereum.org'); + + const codeWithEscapedSpecialCharacters = Array.from(new TextEncoder().encode(code), b => String.fromCharCode(b)).join( + '', + ); + + remix.searchParams.set('code', btoa(codeWithEscapedSpecialCharacters).replace(/=*$/, '')); + + if (upgradeable) { + remix.searchParams.set('deployProxy', upgradeable.toString()); + } + + return remix; +} diff --git a/packages/ui/src/confidential/superchain-tooltip.ts b/packages/ui/src/confidential/superchain-tooltip.ts new file mode 100644 index 000000000..ff466d3a0 --- /dev/null +++ b/packages/ui/src/confidential/superchain-tooltip.ts @@ -0,0 +1,12 @@ +/** + * Tippy.js properties for the Superchain tooltip. + */ +export const superchainTooltipProps: { [prop: string]: string | boolean } = { + content: + 'Important: Only available on chains in the Superchain. Requires deploying your contract to the same address on every chain in the Superchain. Read more.', + trigger: 'manual', + placement: 'bottom', + maxWidth: '22em', + allowHTML: true, + interactive: true, +}; diff --git a/packages/ui/src/main.ts b/packages/ui/src/main.ts index dd85f3db9..4ab357946 100644 --- a/packages/ui/src/main.ts +++ b/packages/ui/src/main.ts @@ -43,7 +43,7 @@ const initialOpts: InitialOptions = { interface CompatibleSelection { compatible: true; - appType: 'solidity' | 'cairo' | 'cairo_alpha' | 'stellar' | 'stylus'; + appType: 'solidity' | 'cairo' | 'cairo_alpha' | 'stellar' | 'stylus' | 'zama'; } interface IncompatibleSelection { From c97d363990a65ecf64cbf70ab2b55d2e060d99ca Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 27 Aug 2025 15:02:18 -0400 Subject: [PATCH 02/46] Add zama icon and styles --- packages/ui/public/cairo.html | 1 + packages/ui/public/icons/zama.png | Bin 0 -> 912 bytes packages/ui/public/index.html | 2 +- packages/ui/public/stellar.html | 1 + packages/ui/public/stylus.html | 1 + packages/ui/public/zama.html | 2 +- packages/ui/src/common/styles/vars.css | 2 ++ packages/ui/src/standalone.css | 10 ++++++++++ 8 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 packages/ui/public/icons/zama.png diff --git a/packages/ui/public/cairo.html b/packages/ui/public/cairo.html index 01bcff71a..357bf6f97 100644 --- a/packages/ui/public/cairo.html +++ b/packages/ui/public/cairo.html @@ -75,6 +75,7 @@
stellarStellar stylusStylus + zamaZama
diff --git a/packages/ui/public/icons/zama.png b/packages/ui/public/icons/zama.png new file mode 100644 index 0000000000000000000000000000000000000000..858ef1855ab9a7531a20f0ca1f92efefc0bde7ff GIT binary patch literal 912 zcmeAS@N?(olHy`uVBq!ia0vp^J|N7&1SCDa9;*RTjKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(<^vw#`F1}PNVdHewb1Jf^07srqa z#<#QV1B4w#j`1q2IB1-#=qsf=(^LCP#>&>PGZ6s+8myXyM}i(Zq;qL=S!+p0Z|PsU z_;Ez0^Wv#2%}h#lug>^&J-&Ope0TZolipj4f4{GNU%vbO+c>S``RC_JeYt;P0r#KP z{;qsnsj4egls`4>TPJu>$v1S;l4_+@A(Ien8LmmmObU1Jd2A0CEID&ub)}s8)%)8X zd$`!uSFYO|xpnSI&)?C-_Sa`yZ*%57`g)a8ZhUvZZS9i*CvV(Ry&1c)^ZN2N-wUHp z2i@j=#C~k0OUe6RtBfyJ+W#vkG!M1^XwYZc`Q>rk>ay*j&W!@aK~tZU+GgtbpTECH zIzChVcD&os$LzX7cP2zB9uzwL`@Uh!#Gi~(*IP6$i5@6$t@~lJ?aPvB>8w(@%LK$c z*BtovY>DByP(_i6x8vQXN0}xpY4we_TOz&WS{l!+TgQJMu4ljE`AZ>gf610>Z_b(U zv232MBg7CsPwj?B=4J7`ce>}lr&!9m=>;#zZ#Y)?v?GOSkKOM6@DQF2J`?rh=2z~S zctKl0JZyFM?(NU(B%D8saH)1`^o#DeI&*>UyiA#OrsW$hUpV_?>(S09OEMXD*!-8h z%@fbCJXKI>X6CHo2Dkm?6J;7Uun98p^hV}!%efjcCcU+-{*e3Yl>YWZzuZ5oPU193 zpYlH3Y0BP?nk|KPpO?&5_f`I~B+OE*ljnEcZ>O|*u{;jSHqY3w-7jaa#Wz_7IXH|^~8u(m_7?Px7Dy;o4_k2Cm)S_a1 zUQgkav1?R4w`0YQ%~ccaG!ozax^nSQudR;jGTA?A;nM8e*hR7@$=lCA7sAn9xO|4B z-;YDTqSu-4E|5E~|gr ztn&2FQ=fO{v6GALw_XkQY&+_l*E?y-Z@o41yo_|@in6CHxl^9_HDpra#|hDkRi5tS eUi~~^!XM`QDNKugcKtd5$_<{belF{r5}E)hVS^C> literal 0 HcmV?d00001 diff --git a/packages/ui/public/index.html b/packages/ui/public/index.html index ddbd06966..adca70530 100644 --- a/packages/ui/public/index.html +++ b/packages/ui/public/index.html @@ -99,7 +99,7 @@ cairoCairo stellarStellar stylusStylus - zamaZama + zamaZama
diff --git a/packages/ui/public/stellar.html b/packages/ui/public/stellar.html index c2d355f4f..072f64630 100644 --- a/packages/ui/public/stellar.html +++ b/packages/ui/public/stellar.html @@ -67,6 +67,7 @@ cairoCairo stellarStellar stylusStylus + zamaZama
diff --git a/packages/ui/public/stylus.html b/packages/ui/public/stylus.html index 2c47c85c1..e4e3f6211 100644 --- a/packages/ui/public/stylus.html +++ b/packages/ui/public/stylus.html @@ -67,6 +67,7 @@ cairoCairo stellarStellar stylusStylus + zamaZama
diff --git a/packages/ui/public/zama.html b/packages/ui/public/zama.html index b1c9c7be3..1a807839a 100644 --- a/packages/ui/public/zama.html +++ b/packages/ui/public/zama.html @@ -67,7 +67,7 @@ cairoCairo stellarStellar stylusStylus - zamaZama + zamaZama
diff --git a/packages/ui/src/common/styles/vars.css b/packages/ui/src/common/styles/vars.css index ed3ce8015..e4d49d1c8 100644 --- a/packages/ui/src/common/styles/vars.css +++ b/packages/ui/src/common/styles/vars.css @@ -34,6 +34,8 @@ --stellar-black: #0f0f0f; + --zama-black: #000000; + /* Dimensions (scale taken from Tailwind) */ --size-1: 0.25rem; diff --git a/packages/ui/src/standalone.css b/packages/ui/src/standalone.css index 5792d2c8a..b59bb1fd3 100644 --- a/packages/ui/src/standalone.css +++ b/packages/ui/src/standalone.css @@ -149,6 +149,16 @@ body { contrast(100%); } +.nav .switch.switch-zama.active { + --color-2: #000000; +} +.nav .switch.switch-zama img { + filter: grayscale(100%); +} +.nav .switch.switch-zama.active img { + filter: grayscale(0); +} + .nav-row { padding: 0 1rem 0; max-width: 100%; From d8df2f17aadc80a99c4c6ccfb867a095b67c3e2a Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 27 Aug 2025 15:03:30 -0400 Subject: [PATCH 03/46] Rename --- packages/core/{confidential => zama}/.gitignore | 0 packages/core/{confidential => zama}/CHANGELOG.md | 0 packages/core/{confidential => zama}/LICENSE | 0 packages/core/{confidential => zama}/NOTICE | 0 packages/core/{confidential => zama}/README.md | 0 packages/core/{confidential => zama}/ava.config.js | 0 .../contracts/SafetyCheck.sol | 0 .../core/{confidential => zama}/get-imports.d.ts | 0 packages/core/{confidential => zama}/get-imports.js | 0 .../core/{confidential => zama}/hardhat.config.js | 0 .../openzeppelin-contracts.d.ts | 0 packages/core/{confidential => zama}/package.json | 0 .../core/{confidential => zama}/print-versioned.js | 0 .../core/{confidential => zama}/print-versioned.ts | 0 packages/core/{confidential => zama}/remappings.txt | 0 .../core/{confidential => zama}/src/account.test.ts | 0 .../{confidential => zama}/src/account.test.ts.md | 0 .../{confidential => zama}/src/account.test.ts.snap | Bin packages/core/{confidential => zama}/src/account.ts | 0 .../core/{confidential => zama}/src/add-pausable.ts | 0 packages/core/{confidential => zama}/src/api.ts | 0 .../{confidential => zama}/src/build-generic.ts | 0 .../{confidential => zama}/src/common-functions.ts | 0 .../{confidential => zama}/src/common-options.ts | 0 .../{confidential => zama}/src/contract.test.ts | 0 .../{confidential => zama}/src/contract.test.ts.md | 0 .../src/contract.test.ts.snap | Bin .../core/{confidential => zama}/src/contract.ts | 0 .../core/{confidential => zama}/src/custom.test.ts | 0 .../{confidential => zama}/src/custom.test.ts.md | 0 .../{confidential => zama}/src/custom.test.ts.snap | Bin packages/core/{confidential => zama}/src/custom.ts | 0 .../src/environments/hardhat/package-lock.json | 0 .../src/environments/hardhat/package.json | 0 .../hardhat/upgradeable/package-lock.json | 0 .../environments/hardhat/upgradeable/package.json | 0 .../core/{confidential => zama}/src/erc1155.test.ts | 0 .../{confidential => zama}/src/erc1155.test.ts.md | 0 .../{confidential => zama}/src/erc1155.test.ts.snap | Bin packages/core/{confidential => zama}/src/erc1155.ts | 0 .../core/{confidential => zama}/src/erc20.test.ts | 0 .../{confidential => zama}/src/erc20.test.ts.md | 0 .../{confidential => zama}/src/erc20.test.ts.snap | Bin packages/core/{confidential => zama}/src/erc20.ts | 0 .../core/{confidential => zama}/src/erc721.test.ts | 0 .../{confidential => zama}/src/erc721.test.ts.md | 0 .../{confidential => zama}/src/erc721.test.ts.snap | Bin packages/core/{confidential => zama}/src/erc721.ts | 0 packages/core/{confidential => zama}/src/error.ts | 0 .../{confidential => zama}/src/generate/account.ts | 0 .../src/generate/alternatives.ts | 0 .../{confidential => zama}/src/generate/custom.ts | 0 .../{confidential => zama}/src/generate/erc1155.ts | 0 .../{confidential => zama}/src/generate/erc20.ts | 0 .../{confidential => zama}/src/generate/erc721.ts | 0 .../{confidential => zama}/src/generate/governor.ts | 0 .../{confidential => zama}/src/generate/sources.ts | 0 .../src/generate/stablecoin.ts | 0 .../{confidential => zama}/src/get-imports.test.ts | 0 .../core/{confidential => zama}/src/get-imports.ts | 0 .../{confidential => zama}/src/governor.test.ts | 0 .../{confidential => zama}/src/governor.test.ts.md | 0 .../src/governor.test.ts.snap | Bin .../core/{confidential => zama}/src/governor.ts | 0 packages/core/{confidential => zama}/src/index.ts | 0 .../src/infer-transpiled.test.ts | 0 .../{confidential => zama}/src/infer-transpiled.ts | 0 packages/core/{confidential => zama}/src/kind.ts | 0 packages/core/{confidential => zama}/src/options.ts | 0 .../{confidential => zama}/src/print-versioned.ts | 0 packages/core/{confidential => zama}/src/print.ts | 0 .../{confidential => zama}/src/scripts/prepare.ts | 0 .../src/set-access-control.ts | 0 .../{confidential => zama}/src/set-clock-mode.ts | 0 .../core/{confidential => zama}/src/set-info.ts | 0 .../{confidential => zama}/src/set-upgradeable.ts | 0 packages/core/{confidential => zama}/src/signer.ts | 0 .../src/solidity-version.json | 0 .../{confidential => zama}/src/stablecoin.test.ts | 0 .../src/stablecoin.test.ts.md | 0 .../src/stablecoin.test.ts.snap | Bin .../core/{confidential => zama}/src/stablecoin.ts | 0 packages/core/{confidential => zama}/src/test.ts | 0 .../utils/community-contracts-git-commit.test.ts | 0 .../src/utils/community-contracts-git-commit.ts | 0 .../src/utils/convert-strings.test.ts | 0 .../src/utils/convert-strings.ts | 0 .../src/utils/define-functions.ts | 0 .../{confidential => zama}/src/utils/duration.ts | 0 .../{confidential => zama}/src/utils/find-cover.ts | 0 .../src/utils/format-lines.ts | 0 .../src/utils/imports-libraries.ts | 0 .../{confidential => zama}/src/utils/map-values.ts | 0 .../src/utils/sanitize.test.ts | 0 .../{confidential => zama}/src/utils/sanitize.ts | 0 .../{confidential => zama}/src/utils/sorted-by.ts | 0 .../src/utils/to-identifier.test.ts | 0 .../src/utils/to-identifier.ts | 0 .../src/utils/transitive-closure.ts | 0 .../src/utils/version.test.ts | 0 .../{confidential => zama}/src/utils/version.ts | 0 .../{confidential => zama}/src/zip-foundry.test.ts | 0 .../src/zip-foundry.test.ts.md | 0 .../src/zip-foundry.test.ts.snap | Bin .../core/{confidential => zama}/src/zip-foundry.ts | 0 .../{confidential => zama}/src/zip-hardhat.test.ts | 0 .../src/zip-hardhat.test.ts.md | 0 .../src/zip-hardhat.test.ts.snap | Bin .../core/{confidential => zama}/src/zip-hardhat.ts | 0 packages/core/{confidential => zama}/tsconfig.json | 0 .../core/{confidential => zama}/zip-env-foundry.js | 0 .../core/{confidential => zama}/zip-env-foundry.ts | 0 .../core/{confidential => zama}/zip-env-hardhat.js | 0 .../core/{confidential => zama}/zip-env-hardhat.ts | 0 .../AccessControlSection.svelte | 0 .../{confidential => zama}/AccountControls.svelte | 0 packages/ui/src/{confidential => zama}/App.svelte | 0 .../{confidential => zama}/CustomControls.svelte | 0 .../{confidential => zama}/ERC1155Controls.svelte | 0 .../src/{confidential => zama}/ERC20Controls.svelte | 0 .../{confidential => zama}/ERC721Controls.svelte | 0 .../{confidential => zama}/GovernorControls.svelte | 0 .../src/{confidential => zama}/InfoSection.svelte | 0 .../RealWorldAssetControls.svelte | 0 .../StablecoinControls.svelte | 0 .../UpgradeabilitySection.svelte | 0 .../ui/src/{confidential => zama}/highlightjs.ts | 0 .../src/{confidential => zama}/inject-hyperlinks.ts | 0 packages/ui/src/{confidential => zama}/remix.ts | 0 .../{confidential => zama}/superchain-tooltip.ts | 0 130 files changed, 0 insertions(+), 0 deletions(-) rename packages/core/{confidential => zama}/.gitignore (100%) rename packages/core/{confidential => zama}/CHANGELOG.md (100%) rename packages/core/{confidential => zama}/LICENSE (100%) rename packages/core/{confidential => zama}/NOTICE (100%) rename packages/core/{confidential => zama}/README.md (100%) rename packages/core/{confidential => zama}/ava.config.js (100%) rename packages/core/{confidential => zama}/contracts/SafetyCheck.sol (100%) rename packages/core/{confidential => zama}/get-imports.d.ts (100%) rename packages/core/{confidential => zama}/get-imports.js (100%) rename packages/core/{confidential => zama}/hardhat.config.js (100%) rename packages/core/{confidential => zama}/openzeppelin-contracts.d.ts (100%) rename packages/core/{confidential => zama}/package.json (100%) rename packages/core/{confidential => zama}/print-versioned.js (100%) rename packages/core/{confidential => zama}/print-versioned.ts (100%) rename packages/core/{confidential => zama}/remappings.txt (100%) rename packages/core/{confidential => zama}/src/account.test.ts (100%) rename packages/core/{confidential => zama}/src/account.test.ts.md (100%) rename packages/core/{confidential => zama}/src/account.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/account.ts (100%) rename packages/core/{confidential => zama}/src/add-pausable.ts (100%) rename packages/core/{confidential => zama}/src/api.ts (100%) rename packages/core/{confidential => zama}/src/build-generic.ts (100%) rename packages/core/{confidential => zama}/src/common-functions.ts (100%) rename packages/core/{confidential => zama}/src/common-options.ts (100%) rename packages/core/{confidential => zama}/src/contract.test.ts (100%) rename packages/core/{confidential => zama}/src/contract.test.ts.md (100%) rename packages/core/{confidential => zama}/src/contract.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/contract.ts (100%) rename packages/core/{confidential => zama}/src/custom.test.ts (100%) rename packages/core/{confidential => zama}/src/custom.test.ts.md (100%) rename packages/core/{confidential => zama}/src/custom.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/custom.ts (100%) rename packages/core/{confidential => zama}/src/environments/hardhat/package-lock.json (100%) rename packages/core/{confidential => zama}/src/environments/hardhat/package.json (100%) rename packages/core/{confidential => zama}/src/environments/hardhat/upgradeable/package-lock.json (100%) rename packages/core/{confidential => zama}/src/environments/hardhat/upgradeable/package.json (100%) rename packages/core/{confidential => zama}/src/erc1155.test.ts (100%) rename packages/core/{confidential => zama}/src/erc1155.test.ts.md (100%) rename packages/core/{confidential => zama}/src/erc1155.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/erc1155.ts (100%) rename packages/core/{confidential => zama}/src/erc20.test.ts (100%) rename packages/core/{confidential => zama}/src/erc20.test.ts.md (100%) rename packages/core/{confidential => zama}/src/erc20.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/erc20.ts (100%) rename packages/core/{confidential => zama}/src/erc721.test.ts (100%) rename packages/core/{confidential => zama}/src/erc721.test.ts.md (100%) rename packages/core/{confidential => zama}/src/erc721.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/erc721.ts (100%) rename packages/core/{confidential => zama}/src/error.ts (100%) rename packages/core/{confidential => zama}/src/generate/account.ts (100%) rename packages/core/{confidential => zama}/src/generate/alternatives.ts (100%) rename packages/core/{confidential => zama}/src/generate/custom.ts (100%) rename packages/core/{confidential => zama}/src/generate/erc1155.ts (100%) rename packages/core/{confidential => zama}/src/generate/erc20.ts (100%) rename packages/core/{confidential => zama}/src/generate/erc721.ts (100%) rename packages/core/{confidential => zama}/src/generate/governor.ts (100%) rename packages/core/{confidential => zama}/src/generate/sources.ts (100%) rename packages/core/{confidential => zama}/src/generate/stablecoin.ts (100%) rename packages/core/{confidential => zama}/src/get-imports.test.ts (100%) rename packages/core/{confidential => zama}/src/get-imports.ts (100%) rename packages/core/{confidential => zama}/src/governor.test.ts (100%) rename packages/core/{confidential => zama}/src/governor.test.ts.md (100%) rename packages/core/{confidential => zama}/src/governor.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/governor.ts (100%) rename packages/core/{confidential => zama}/src/index.ts (100%) rename packages/core/{confidential => zama}/src/infer-transpiled.test.ts (100%) rename packages/core/{confidential => zama}/src/infer-transpiled.ts (100%) rename packages/core/{confidential => zama}/src/kind.ts (100%) rename packages/core/{confidential => zama}/src/options.ts (100%) rename packages/core/{confidential => zama}/src/print-versioned.ts (100%) rename packages/core/{confidential => zama}/src/print.ts (100%) rename packages/core/{confidential => zama}/src/scripts/prepare.ts (100%) rename packages/core/{confidential => zama}/src/set-access-control.ts (100%) rename packages/core/{confidential => zama}/src/set-clock-mode.ts (100%) rename packages/core/{confidential => zama}/src/set-info.ts (100%) rename packages/core/{confidential => zama}/src/set-upgradeable.ts (100%) rename packages/core/{confidential => zama}/src/signer.ts (100%) rename packages/core/{confidential => zama}/src/solidity-version.json (100%) rename packages/core/{confidential => zama}/src/stablecoin.test.ts (100%) rename packages/core/{confidential => zama}/src/stablecoin.test.ts.md (100%) rename packages/core/{confidential => zama}/src/stablecoin.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/stablecoin.ts (100%) rename packages/core/{confidential => zama}/src/test.ts (100%) rename packages/core/{confidential => zama}/src/utils/community-contracts-git-commit.test.ts (100%) rename packages/core/{confidential => zama}/src/utils/community-contracts-git-commit.ts (100%) rename packages/core/{confidential => zama}/src/utils/convert-strings.test.ts (100%) rename packages/core/{confidential => zama}/src/utils/convert-strings.ts (100%) rename packages/core/{confidential => zama}/src/utils/define-functions.ts (100%) rename packages/core/{confidential => zama}/src/utils/duration.ts (100%) rename packages/core/{confidential => zama}/src/utils/find-cover.ts (100%) rename packages/core/{confidential => zama}/src/utils/format-lines.ts (100%) rename packages/core/{confidential => zama}/src/utils/imports-libraries.ts (100%) rename packages/core/{confidential => zama}/src/utils/map-values.ts (100%) rename packages/core/{confidential => zama}/src/utils/sanitize.test.ts (100%) rename packages/core/{confidential => zama}/src/utils/sanitize.ts (100%) rename packages/core/{confidential => zama}/src/utils/sorted-by.ts (100%) rename packages/core/{confidential => zama}/src/utils/to-identifier.test.ts (100%) rename packages/core/{confidential => zama}/src/utils/to-identifier.ts (100%) rename packages/core/{confidential => zama}/src/utils/transitive-closure.ts (100%) rename packages/core/{confidential => zama}/src/utils/version.test.ts (100%) rename packages/core/{confidential => zama}/src/utils/version.ts (100%) rename packages/core/{confidential => zama}/src/zip-foundry.test.ts (100%) rename packages/core/{confidential => zama}/src/zip-foundry.test.ts.md (100%) rename packages/core/{confidential => zama}/src/zip-foundry.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/zip-foundry.ts (100%) rename packages/core/{confidential => zama}/src/zip-hardhat.test.ts (100%) rename packages/core/{confidential => zama}/src/zip-hardhat.test.ts.md (100%) rename packages/core/{confidential => zama}/src/zip-hardhat.test.ts.snap (100%) rename packages/core/{confidential => zama}/src/zip-hardhat.ts (100%) rename packages/core/{confidential => zama}/tsconfig.json (100%) rename packages/core/{confidential => zama}/zip-env-foundry.js (100%) rename packages/core/{confidential => zama}/zip-env-foundry.ts (100%) rename packages/core/{confidential => zama}/zip-env-hardhat.js (100%) rename packages/core/{confidential => zama}/zip-env-hardhat.ts (100%) rename packages/ui/src/{confidential => zama}/AccessControlSection.svelte (100%) rename packages/ui/src/{confidential => zama}/AccountControls.svelte (100%) rename packages/ui/src/{confidential => zama}/App.svelte (100%) rename packages/ui/src/{confidential => zama}/CustomControls.svelte (100%) rename packages/ui/src/{confidential => zama}/ERC1155Controls.svelte (100%) rename packages/ui/src/{confidential => zama}/ERC20Controls.svelte (100%) rename packages/ui/src/{confidential => zama}/ERC721Controls.svelte (100%) rename packages/ui/src/{confidential => zama}/GovernorControls.svelte (100%) rename packages/ui/src/{confidential => zama}/InfoSection.svelte (100%) rename packages/ui/src/{confidential => zama}/RealWorldAssetControls.svelte (100%) rename packages/ui/src/{confidential => zama}/StablecoinControls.svelte (100%) rename packages/ui/src/{confidential => zama}/UpgradeabilitySection.svelte (100%) rename packages/ui/src/{confidential => zama}/highlightjs.ts (100%) rename packages/ui/src/{confidential => zama}/inject-hyperlinks.ts (100%) rename packages/ui/src/{confidential => zama}/remix.ts (100%) rename packages/ui/src/{confidential => zama}/superchain-tooltip.ts (100%) diff --git a/packages/core/confidential/.gitignore b/packages/core/zama/.gitignore similarity index 100% rename from packages/core/confidential/.gitignore rename to packages/core/zama/.gitignore diff --git a/packages/core/confidential/CHANGELOG.md b/packages/core/zama/CHANGELOG.md similarity index 100% rename from packages/core/confidential/CHANGELOG.md rename to packages/core/zama/CHANGELOG.md diff --git a/packages/core/confidential/LICENSE b/packages/core/zama/LICENSE similarity index 100% rename from packages/core/confidential/LICENSE rename to packages/core/zama/LICENSE diff --git a/packages/core/confidential/NOTICE b/packages/core/zama/NOTICE similarity index 100% rename from packages/core/confidential/NOTICE rename to packages/core/zama/NOTICE diff --git a/packages/core/confidential/README.md b/packages/core/zama/README.md similarity index 100% rename from packages/core/confidential/README.md rename to packages/core/zama/README.md diff --git a/packages/core/confidential/ava.config.js b/packages/core/zama/ava.config.js similarity index 100% rename from packages/core/confidential/ava.config.js rename to packages/core/zama/ava.config.js diff --git a/packages/core/confidential/contracts/SafetyCheck.sol b/packages/core/zama/contracts/SafetyCheck.sol similarity index 100% rename from packages/core/confidential/contracts/SafetyCheck.sol rename to packages/core/zama/contracts/SafetyCheck.sol diff --git a/packages/core/confidential/get-imports.d.ts b/packages/core/zama/get-imports.d.ts similarity index 100% rename from packages/core/confidential/get-imports.d.ts rename to packages/core/zama/get-imports.d.ts diff --git a/packages/core/confidential/get-imports.js b/packages/core/zama/get-imports.js similarity index 100% rename from packages/core/confidential/get-imports.js rename to packages/core/zama/get-imports.js diff --git a/packages/core/confidential/hardhat.config.js b/packages/core/zama/hardhat.config.js similarity index 100% rename from packages/core/confidential/hardhat.config.js rename to packages/core/zama/hardhat.config.js diff --git a/packages/core/confidential/openzeppelin-contracts.d.ts b/packages/core/zama/openzeppelin-contracts.d.ts similarity index 100% rename from packages/core/confidential/openzeppelin-contracts.d.ts rename to packages/core/zama/openzeppelin-contracts.d.ts diff --git a/packages/core/confidential/package.json b/packages/core/zama/package.json similarity index 100% rename from packages/core/confidential/package.json rename to packages/core/zama/package.json diff --git a/packages/core/confidential/print-versioned.js b/packages/core/zama/print-versioned.js similarity index 100% rename from packages/core/confidential/print-versioned.js rename to packages/core/zama/print-versioned.js diff --git a/packages/core/confidential/print-versioned.ts b/packages/core/zama/print-versioned.ts similarity index 100% rename from packages/core/confidential/print-versioned.ts rename to packages/core/zama/print-versioned.ts diff --git a/packages/core/confidential/remappings.txt b/packages/core/zama/remappings.txt similarity index 100% rename from packages/core/confidential/remappings.txt rename to packages/core/zama/remappings.txt diff --git a/packages/core/confidential/src/account.test.ts b/packages/core/zama/src/account.test.ts similarity index 100% rename from packages/core/confidential/src/account.test.ts rename to packages/core/zama/src/account.test.ts diff --git a/packages/core/confidential/src/account.test.ts.md b/packages/core/zama/src/account.test.ts.md similarity index 100% rename from packages/core/confidential/src/account.test.ts.md rename to packages/core/zama/src/account.test.ts.md diff --git a/packages/core/confidential/src/account.test.ts.snap b/packages/core/zama/src/account.test.ts.snap similarity index 100% rename from packages/core/confidential/src/account.test.ts.snap rename to packages/core/zama/src/account.test.ts.snap diff --git a/packages/core/confidential/src/account.ts b/packages/core/zama/src/account.ts similarity index 100% rename from packages/core/confidential/src/account.ts rename to packages/core/zama/src/account.ts diff --git a/packages/core/confidential/src/add-pausable.ts b/packages/core/zama/src/add-pausable.ts similarity index 100% rename from packages/core/confidential/src/add-pausable.ts rename to packages/core/zama/src/add-pausable.ts diff --git a/packages/core/confidential/src/api.ts b/packages/core/zama/src/api.ts similarity index 100% rename from packages/core/confidential/src/api.ts rename to packages/core/zama/src/api.ts diff --git a/packages/core/confidential/src/build-generic.ts b/packages/core/zama/src/build-generic.ts similarity index 100% rename from packages/core/confidential/src/build-generic.ts rename to packages/core/zama/src/build-generic.ts diff --git a/packages/core/confidential/src/common-functions.ts b/packages/core/zama/src/common-functions.ts similarity index 100% rename from packages/core/confidential/src/common-functions.ts rename to packages/core/zama/src/common-functions.ts diff --git a/packages/core/confidential/src/common-options.ts b/packages/core/zama/src/common-options.ts similarity index 100% rename from packages/core/confidential/src/common-options.ts rename to packages/core/zama/src/common-options.ts diff --git a/packages/core/confidential/src/contract.test.ts b/packages/core/zama/src/contract.test.ts similarity index 100% rename from packages/core/confidential/src/contract.test.ts rename to packages/core/zama/src/contract.test.ts diff --git a/packages/core/confidential/src/contract.test.ts.md b/packages/core/zama/src/contract.test.ts.md similarity index 100% rename from packages/core/confidential/src/contract.test.ts.md rename to packages/core/zama/src/contract.test.ts.md diff --git a/packages/core/confidential/src/contract.test.ts.snap b/packages/core/zama/src/contract.test.ts.snap similarity index 100% rename from packages/core/confidential/src/contract.test.ts.snap rename to packages/core/zama/src/contract.test.ts.snap diff --git a/packages/core/confidential/src/contract.ts b/packages/core/zama/src/contract.ts similarity index 100% rename from packages/core/confidential/src/contract.ts rename to packages/core/zama/src/contract.ts diff --git a/packages/core/confidential/src/custom.test.ts b/packages/core/zama/src/custom.test.ts similarity index 100% rename from packages/core/confidential/src/custom.test.ts rename to packages/core/zama/src/custom.test.ts diff --git a/packages/core/confidential/src/custom.test.ts.md b/packages/core/zama/src/custom.test.ts.md similarity index 100% rename from packages/core/confidential/src/custom.test.ts.md rename to packages/core/zama/src/custom.test.ts.md diff --git a/packages/core/confidential/src/custom.test.ts.snap b/packages/core/zama/src/custom.test.ts.snap similarity index 100% rename from packages/core/confidential/src/custom.test.ts.snap rename to packages/core/zama/src/custom.test.ts.snap diff --git a/packages/core/confidential/src/custom.ts b/packages/core/zama/src/custom.ts similarity index 100% rename from packages/core/confidential/src/custom.ts rename to packages/core/zama/src/custom.ts diff --git a/packages/core/confidential/src/environments/hardhat/package-lock.json b/packages/core/zama/src/environments/hardhat/package-lock.json similarity index 100% rename from packages/core/confidential/src/environments/hardhat/package-lock.json rename to packages/core/zama/src/environments/hardhat/package-lock.json diff --git a/packages/core/confidential/src/environments/hardhat/package.json b/packages/core/zama/src/environments/hardhat/package.json similarity index 100% rename from packages/core/confidential/src/environments/hardhat/package.json rename to packages/core/zama/src/environments/hardhat/package.json diff --git a/packages/core/confidential/src/environments/hardhat/upgradeable/package-lock.json b/packages/core/zama/src/environments/hardhat/upgradeable/package-lock.json similarity index 100% rename from packages/core/confidential/src/environments/hardhat/upgradeable/package-lock.json rename to packages/core/zama/src/environments/hardhat/upgradeable/package-lock.json diff --git a/packages/core/confidential/src/environments/hardhat/upgradeable/package.json b/packages/core/zama/src/environments/hardhat/upgradeable/package.json similarity index 100% rename from packages/core/confidential/src/environments/hardhat/upgradeable/package.json rename to packages/core/zama/src/environments/hardhat/upgradeable/package.json diff --git a/packages/core/confidential/src/erc1155.test.ts b/packages/core/zama/src/erc1155.test.ts similarity index 100% rename from packages/core/confidential/src/erc1155.test.ts rename to packages/core/zama/src/erc1155.test.ts diff --git a/packages/core/confidential/src/erc1155.test.ts.md b/packages/core/zama/src/erc1155.test.ts.md similarity index 100% rename from packages/core/confidential/src/erc1155.test.ts.md rename to packages/core/zama/src/erc1155.test.ts.md diff --git a/packages/core/confidential/src/erc1155.test.ts.snap b/packages/core/zama/src/erc1155.test.ts.snap similarity index 100% rename from packages/core/confidential/src/erc1155.test.ts.snap rename to packages/core/zama/src/erc1155.test.ts.snap diff --git a/packages/core/confidential/src/erc1155.ts b/packages/core/zama/src/erc1155.ts similarity index 100% rename from packages/core/confidential/src/erc1155.ts rename to packages/core/zama/src/erc1155.ts diff --git a/packages/core/confidential/src/erc20.test.ts b/packages/core/zama/src/erc20.test.ts similarity index 100% rename from packages/core/confidential/src/erc20.test.ts rename to packages/core/zama/src/erc20.test.ts diff --git a/packages/core/confidential/src/erc20.test.ts.md b/packages/core/zama/src/erc20.test.ts.md similarity index 100% rename from packages/core/confidential/src/erc20.test.ts.md rename to packages/core/zama/src/erc20.test.ts.md diff --git a/packages/core/confidential/src/erc20.test.ts.snap b/packages/core/zama/src/erc20.test.ts.snap similarity index 100% rename from packages/core/confidential/src/erc20.test.ts.snap rename to packages/core/zama/src/erc20.test.ts.snap diff --git a/packages/core/confidential/src/erc20.ts b/packages/core/zama/src/erc20.ts similarity index 100% rename from packages/core/confidential/src/erc20.ts rename to packages/core/zama/src/erc20.ts diff --git a/packages/core/confidential/src/erc721.test.ts b/packages/core/zama/src/erc721.test.ts similarity index 100% rename from packages/core/confidential/src/erc721.test.ts rename to packages/core/zama/src/erc721.test.ts diff --git a/packages/core/confidential/src/erc721.test.ts.md b/packages/core/zama/src/erc721.test.ts.md similarity index 100% rename from packages/core/confidential/src/erc721.test.ts.md rename to packages/core/zama/src/erc721.test.ts.md diff --git a/packages/core/confidential/src/erc721.test.ts.snap b/packages/core/zama/src/erc721.test.ts.snap similarity index 100% rename from packages/core/confidential/src/erc721.test.ts.snap rename to packages/core/zama/src/erc721.test.ts.snap diff --git a/packages/core/confidential/src/erc721.ts b/packages/core/zama/src/erc721.ts similarity index 100% rename from packages/core/confidential/src/erc721.ts rename to packages/core/zama/src/erc721.ts diff --git a/packages/core/confidential/src/error.ts b/packages/core/zama/src/error.ts similarity index 100% rename from packages/core/confidential/src/error.ts rename to packages/core/zama/src/error.ts diff --git a/packages/core/confidential/src/generate/account.ts b/packages/core/zama/src/generate/account.ts similarity index 100% rename from packages/core/confidential/src/generate/account.ts rename to packages/core/zama/src/generate/account.ts diff --git a/packages/core/confidential/src/generate/alternatives.ts b/packages/core/zama/src/generate/alternatives.ts similarity index 100% rename from packages/core/confidential/src/generate/alternatives.ts rename to packages/core/zama/src/generate/alternatives.ts diff --git a/packages/core/confidential/src/generate/custom.ts b/packages/core/zama/src/generate/custom.ts similarity index 100% rename from packages/core/confidential/src/generate/custom.ts rename to packages/core/zama/src/generate/custom.ts diff --git a/packages/core/confidential/src/generate/erc1155.ts b/packages/core/zama/src/generate/erc1155.ts similarity index 100% rename from packages/core/confidential/src/generate/erc1155.ts rename to packages/core/zama/src/generate/erc1155.ts diff --git a/packages/core/confidential/src/generate/erc20.ts b/packages/core/zama/src/generate/erc20.ts similarity index 100% rename from packages/core/confidential/src/generate/erc20.ts rename to packages/core/zama/src/generate/erc20.ts diff --git a/packages/core/confidential/src/generate/erc721.ts b/packages/core/zama/src/generate/erc721.ts similarity index 100% rename from packages/core/confidential/src/generate/erc721.ts rename to packages/core/zama/src/generate/erc721.ts diff --git a/packages/core/confidential/src/generate/governor.ts b/packages/core/zama/src/generate/governor.ts similarity index 100% rename from packages/core/confidential/src/generate/governor.ts rename to packages/core/zama/src/generate/governor.ts diff --git a/packages/core/confidential/src/generate/sources.ts b/packages/core/zama/src/generate/sources.ts similarity index 100% rename from packages/core/confidential/src/generate/sources.ts rename to packages/core/zama/src/generate/sources.ts diff --git a/packages/core/confidential/src/generate/stablecoin.ts b/packages/core/zama/src/generate/stablecoin.ts similarity index 100% rename from packages/core/confidential/src/generate/stablecoin.ts rename to packages/core/zama/src/generate/stablecoin.ts diff --git a/packages/core/confidential/src/get-imports.test.ts b/packages/core/zama/src/get-imports.test.ts similarity index 100% rename from packages/core/confidential/src/get-imports.test.ts rename to packages/core/zama/src/get-imports.test.ts diff --git a/packages/core/confidential/src/get-imports.ts b/packages/core/zama/src/get-imports.ts similarity index 100% rename from packages/core/confidential/src/get-imports.ts rename to packages/core/zama/src/get-imports.ts diff --git a/packages/core/confidential/src/governor.test.ts b/packages/core/zama/src/governor.test.ts similarity index 100% rename from packages/core/confidential/src/governor.test.ts rename to packages/core/zama/src/governor.test.ts diff --git a/packages/core/confidential/src/governor.test.ts.md b/packages/core/zama/src/governor.test.ts.md similarity index 100% rename from packages/core/confidential/src/governor.test.ts.md rename to packages/core/zama/src/governor.test.ts.md diff --git a/packages/core/confidential/src/governor.test.ts.snap b/packages/core/zama/src/governor.test.ts.snap similarity index 100% rename from packages/core/confidential/src/governor.test.ts.snap rename to packages/core/zama/src/governor.test.ts.snap diff --git a/packages/core/confidential/src/governor.ts b/packages/core/zama/src/governor.ts similarity index 100% rename from packages/core/confidential/src/governor.ts rename to packages/core/zama/src/governor.ts diff --git a/packages/core/confidential/src/index.ts b/packages/core/zama/src/index.ts similarity index 100% rename from packages/core/confidential/src/index.ts rename to packages/core/zama/src/index.ts diff --git a/packages/core/confidential/src/infer-transpiled.test.ts b/packages/core/zama/src/infer-transpiled.test.ts similarity index 100% rename from packages/core/confidential/src/infer-transpiled.test.ts rename to packages/core/zama/src/infer-transpiled.test.ts diff --git a/packages/core/confidential/src/infer-transpiled.ts b/packages/core/zama/src/infer-transpiled.ts similarity index 100% rename from packages/core/confidential/src/infer-transpiled.ts rename to packages/core/zama/src/infer-transpiled.ts diff --git a/packages/core/confidential/src/kind.ts b/packages/core/zama/src/kind.ts similarity index 100% rename from packages/core/confidential/src/kind.ts rename to packages/core/zama/src/kind.ts diff --git a/packages/core/confidential/src/options.ts b/packages/core/zama/src/options.ts similarity index 100% rename from packages/core/confidential/src/options.ts rename to packages/core/zama/src/options.ts diff --git a/packages/core/confidential/src/print-versioned.ts b/packages/core/zama/src/print-versioned.ts similarity index 100% rename from packages/core/confidential/src/print-versioned.ts rename to packages/core/zama/src/print-versioned.ts diff --git a/packages/core/confidential/src/print.ts b/packages/core/zama/src/print.ts similarity index 100% rename from packages/core/confidential/src/print.ts rename to packages/core/zama/src/print.ts diff --git a/packages/core/confidential/src/scripts/prepare.ts b/packages/core/zama/src/scripts/prepare.ts similarity index 100% rename from packages/core/confidential/src/scripts/prepare.ts rename to packages/core/zama/src/scripts/prepare.ts diff --git a/packages/core/confidential/src/set-access-control.ts b/packages/core/zama/src/set-access-control.ts similarity index 100% rename from packages/core/confidential/src/set-access-control.ts rename to packages/core/zama/src/set-access-control.ts diff --git a/packages/core/confidential/src/set-clock-mode.ts b/packages/core/zama/src/set-clock-mode.ts similarity index 100% rename from packages/core/confidential/src/set-clock-mode.ts rename to packages/core/zama/src/set-clock-mode.ts diff --git a/packages/core/confidential/src/set-info.ts b/packages/core/zama/src/set-info.ts similarity index 100% rename from packages/core/confidential/src/set-info.ts rename to packages/core/zama/src/set-info.ts diff --git a/packages/core/confidential/src/set-upgradeable.ts b/packages/core/zama/src/set-upgradeable.ts similarity index 100% rename from packages/core/confidential/src/set-upgradeable.ts rename to packages/core/zama/src/set-upgradeable.ts diff --git a/packages/core/confidential/src/signer.ts b/packages/core/zama/src/signer.ts similarity index 100% rename from packages/core/confidential/src/signer.ts rename to packages/core/zama/src/signer.ts diff --git a/packages/core/confidential/src/solidity-version.json b/packages/core/zama/src/solidity-version.json similarity index 100% rename from packages/core/confidential/src/solidity-version.json rename to packages/core/zama/src/solidity-version.json diff --git a/packages/core/confidential/src/stablecoin.test.ts b/packages/core/zama/src/stablecoin.test.ts similarity index 100% rename from packages/core/confidential/src/stablecoin.test.ts rename to packages/core/zama/src/stablecoin.test.ts diff --git a/packages/core/confidential/src/stablecoin.test.ts.md b/packages/core/zama/src/stablecoin.test.ts.md similarity index 100% rename from packages/core/confidential/src/stablecoin.test.ts.md rename to packages/core/zama/src/stablecoin.test.ts.md diff --git a/packages/core/confidential/src/stablecoin.test.ts.snap b/packages/core/zama/src/stablecoin.test.ts.snap similarity index 100% rename from packages/core/confidential/src/stablecoin.test.ts.snap rename to packages/core/zama/src/stablecoin.test.ts.snap diff --git a/packages/core/confidential/src/stablecoin.ts b/packages/core/zama/src/stablecoin.ts similarity index 100% rename from packages/core/confidential/src/stablecoin.ts rename to packages/core/zama/src/stablecoin.ts diff --git a/packages/core/confidential/src/test.ts b/packages/core/zama/src/test.ts similarity index 100% rename from packages/core/confidential/src/test.ts rename to packages/core/zama/src/test.ts diff --git a/packages/core/confidential/src/utils/community-contracts-git-commit.test.ts b/packages/core/zama/src/utils/community-contracts-git-commit.test.ts similarity index 100% rename from packages/core/confidential/src/utils/community-contracts-git-commit.test.ts rename to packages/core/zama/src/utils/community-contracts-git-commit.test.ts diff --git a/packages/core/confidential/src/utils/community-contracts-git-commit.ts b/packages/core/zama/src/utils/community-contracts-git-commit.ts similarity index 100% rename from packages/core/confidential/src/utils/community-contracts-git-commit.ts rename to packages/core/zama/src/utils/community-contracts-git-commit.ts diff --git a/packages/core/confidential/src/utils/convert-strings.test.ts b/packages/core/zama/src/utils/convert-strings.test.ts similarity index 100% rename from packages/core/confidential/src/utils/convert-strings.test.ts rename to packages/core/zama/src/utils/convert-strings.test.ts diff --git a/packages/core/confidential/src/utils/convert-strings.ts b/packages/core/zama/src/utils/convert-strings.ts similarity index 100% rename from packages/core/confidential/src/utils/convert-strings.ts rename to packages/core/zama/src/utils/convert-strings.ts diff --git a/packages/core/confidential/src/utils/define-functions.ts b/packages/core/zama/src/utils/define-functions.ts similarity index 100% rename from packages/core/confidential/src/utils/define-functions.ts rename to packages/core/zama/src/utils/define-functions.ts diff --git a/packages/core/confidential/src/utils/duration.ts b/packages/core/zama/src/utils/duration.ts similarity index 100% rename from packages/core/confidential/src/utils/duration.ts rename to packages/core/zama/src/utils/duration.ts diff --git a/packages/core/confidential/src/utils/find-cover.ts b/packages/core/zama/src/utils/find-cover.ts similarity index 100% rename from packages/core/confidential/src/utils/find-cover.ts rename to packages/core/zama/src/utils/find-cover.ts diff --git a/packages/core/confidential/src/utils/format-lines.ts b/packages/core/zama/src/utils/format-lines.ts similarity index 100% rename from packages/core/confidential/src/utils/format-lines.ts rename to packages/core/zama/src/utils/format-lines.ts diff --git a/packages/core/confidential/src/utils/imports-libraries.ts b/packages/core/zama/src/utils/imports-libraries.ts similarity index 100% rename from packages/core/confidential/src/utils/imports-libraries.ts rename to packages/core/zama/src/utils/imports-libraries.ts diff --git a/packages/core/confidential/src/utils/map-values.ts b/packages/core/zama/src/utils/map-values.ts similarity index 100% rename from packages/core/confidential/src/utils/map-values.ts rename to packages/core/zama/src/utils/map-values.ts diff --git a/packages/core/confidential/src/utils/sanitize.test.ts b/packages/core/zama/src/utils/sanitize.test.ts similarity index 100% rename from packages/core/confidential/src/utils/sanitize.test.ts rename to packages/core/zama/src/utils/sanitize.test.ts diff --git a/packages/core/confidential/src/utils/sanitize.ts b/packages/core/zama/src/utils/sanitize.ts similarity index 100% rename from packages/core/confidential/src/utils/sanitize.ts rename to packages/core/zama/src/utils/sanitize.ts diff --git a/packages/core/confidential/src/utils/sorted-by.ts b/packages/core/zama/src/utils/sorted-by.ts similarity index 100% rename from packages/core/confidential/src/utils/sorted-by.ts rename to packages/core/zama/src/utils/sorted-by.ts diff --git a/packages/core/confidential/src/utils/to-identifier.test.ts b/packages/core/zama/src/utils/to-identifier.test.ts similarity index 100% rename from packages/core/confidential/src/utils/to-identifier.test.ts rename to packages/core/zama/src/utils/to-identifier.test.ts diff --git a/packages/core/confidential/src/utils/to-identifier.ts b/packages/core/zama/src/utils/to-identifier.ts similarity index 100% rename from packages/core/confidential/src/utils/to-identifier.ts rename to packages/core/zama/src/utils/to-identifier.ts diff --git a/packages/core/confidential/src/utils/transitive-closure.ts b/packages/core/zama/src/utils/transitive-closure.ts similarity index 100% rename from packages/core/confidential/src/utils/transitive-closure.ts rename to packages/core/zama/src/utils/transitive-closure.ts diff --git a/packages/core/confidential/src/utils/version.test.ts b/packages/core/zama/src/utils/version.test.ts similarity index 100% rename from packages/core/confidential/src/utils/version.test.ts rename to packages/core/zama/src/utils/version.test.ts diff --git a/packages/core/confidential/src/utils/version.ts b/packages/core/zama/src/utils/version.ts similarity index 100% rename from packages/core/confidential/src/utils/version.ts rename to packages/core/zama/src/utils/version.ts diff --git a/packages/core/confidential/src/zip-foundry.test.ts b/packages/core/zama/src/zip-foundry.test.ts similarity index 100% rename from packages/core/confidential/src/zip-foundry.test.ts rename to packages/core/zama/src/zip-foundry.test.ts diff --git a/packages/core/confidential/src/zip-foundry.test.ts.md b/packages/core/zama/src/zip-foundry.test.ts.md similarity index 100% rename from packages/core/confidential/src/zip-foundry.test.ts.md rename to packages/core/zama/src/zip-foundry.test.ts.md diff --git a/packages/core/confidential/src/zip-foundry.test.ts.snap b/packages/core/zama/src/zip-foundry.test.ts.snap similarity index 100% rename from packages/core/confidential/src/zip-foundry.test.ts.snap rename to packages/core/zama/src/zip-foundry.test.ts.snap diff --git a/packages/core/confidential/src/zip-foundry.ts b/packages/core/zama/src/zip-foundry.ts similarity index 100% rename from packages/core/confidential/src/zip-foundry.ts rename to packages/core/zama/src/zip-foundry.ts diff --git a/packages/core/confidential/src/zip-hardhat.test.ts b/packages/core/zama/src/zip-hardhat.test.ts similarity index 100% rename from packages/core/confidential/src/zip-hardhat.test.ts rename to packages/core/zama/src/zip-hardhat.test.ts diff --git a/packages/core/confidential/src/zip-hardhat.test.ts.md b/packages/core/zama/src/zip-hardhat.test.ts.md similarity index 100% rename from packages/core/confidential/src/zip-hardhat.test.ts.md rename to packages/core/zama/src/zip-hardhat.test.ts.md diff --git a/packages/core/confidential/src/zip-hardhat.test.ts.snap b/packages/core/zama/src/zip-hardhat.test.ts.snap similarity index 100% rename from packages/core/confidential/src/zip-hardhat.test.ts.snap rename to packages/core/zama/src/zip-hardhat.test.ts.snap diff --git a/packages/core/confidential/src/zip-hardhat.ts b/packages/core/zama/src/zip-hardhat.ts similarity index 100% rename from packages/core/confidential/src/zip-hardhat.ts rename to packages/core/zama/src/zip-hardhat.ts diff --git a/packages/core/confidential/tsconfig.json b/packages/core/zama/tsconfig.json similarity index 100% rename from packages/core/confidential/tsconfig.json rename to packages/core/zama/tsconfig.json diff --git a/packages/core/confidential/zip-env-foundry.js b/packages/core/zama/zip-env-foundry.js similarity index 100% rename from packages/core/confidential/zip-env-foundry.js rename to packages/core/zama/zip-env-foundry.js diff --git a/packages/core/confidential/zip-env-foundry.ts b/packages/core/zama/zip-env-foundry.ts similarity index 100% rename from packages/core/confidential/zip-env-foundry.ts rename to packages/core/zama/zip-env-foundry.ts diff --git a/packages/core/confidential/zip-env-hardhat.js b/packages/core/zama/zip-env-hardhat.js similarity index 100% rename from packages/core/confidential/zip-env-hardhat.js rename to packages/core/zama/zip-env-hardhat.js diff --git a/packages/core/confidential/zip-env-hardhat.ts b/packages/core/zama/zip-env-hardhat.ts similarity index 100% rename from packages/core/confidential/zip-env-hardhat.ts rename to packages/core/zama/zip-env-hardhat.ts diff --git a/packages/ui/src/confidential/AccessControlSection.svelte b/packages/ui/src/zama/AccessControlSection.svelte similarity index 100% rename from packages/ui/src/confidential/AccessControlSection.svelte rename to packages/ui/src/zama/AccessControlSection.svelte diff --git a/packages/ui/src/confidential/AccountControls.svelte b/packages/ui/src/zama/AccountControls.svelte similarity index 100% rename from packages/ui/src/confidential/AccountControls.svelte rename to packages/ui/src/zama/AccountControls.svelte diff --git a/packages/ui/src/confidential/App.svelte b/packages/ui/src/zama/App.svelte similarity index 100% rename from packages/ui/src/confidential/App.svelte rename to packages/ui/src/zama/App.svelte diff --git a/packages/ui/src/confidential/CustomControls.svelte b/packages/ui/src/zama/CustomControls.svelte similarity index 100% rename from packages/ui/src/confidential/CustomControls.svelte rename to packages/ui/src/zama/CustomControls.svelte diff --git a/packages/ui/src/confidential/ERC1155Controls.svelte b/packages/ui/src/zama/ERC1155Controls.svelte similarity index 100% rename from packages/ui/src/confidential/ERC1155Controls.svelte rename to packages/ui/src/zama/ERC1155Controls.svelte diff --git a/packages/ui/src/confidential/ERC20Controls.svelte b/packages/ui/src/zama/ERC20Controls.svelte similarity index 100% rename from packages/ui/src/confidential/ERC20Controls.svelte rename to packages/ui/src/zama/ERC20Controls.svelte diff --git a/packages/ui/src/confidential/ERC721Controls.svelte b/packages/ui/src/zama/ERC721Controls.svelte similarity index 100% rename from packages/ui/src/confidential/ERC721Controls.svelte rename to packages/ui/src/zama/ERC721Controls.svelte diff --git a/packages/ui/src/confidential/GovernorControls.svelte b/packages/ui/src/zama/GovernorControls.svelte similarity index 100% rename from packages/ui/src/confidential/GovernorControls.svelte rename to packages/ui/src/zama/GovernorControls.svelte diff --git a/packages/ui/src/confidential/InfoSection.svelte b/packages/ui/src/zama/InfoSection.svelte similarity index 100% rename from packages/ui/src/confidential/InfoSection.svelte rename to packages/ui/src/zama/InfoSection.svelte diff --git a/packages/ui/src/confidential/RealWorldAssetControls.svelte b/packages/ui/src/zama/RealWorldAssetControls.svelte similarity index 100% rename from packages/ui/src/confidential/RealWorldAssetControls.svelte rename to packages/ui/src/zama/RealWorldAssetControls.svelte diff --git a/packages/ui/src/confidential/StablecoinControls.svelte b/packages/ui/src/zama/StablecoinControls.svelte similarity index 100% rename from packages/ui/src/confidential/StablecoinControls.svelte rename to packages/ui/src/zama/StablecoinControls.svelte diff --git a/packages/ui/src/confidential/UpgradeabilitySection.svelte b/packages/ui/src/zama/UpgradeabilitySection.svelte similarity index 100% rename from packages/ui/src/confidential/UpgradeabilitySection.svelte rename to packages/ui/src/zama/UpgradeabilitySection.svelte diff --git a/packages/ui/src/confidential/highlightjs.ts b/packages/ui/src/zama/highlightjs.ts similarity index 100% rename from packages/ui/src/confidential/highlightjs.ts rename to packages/ui/src/zama/highlightjs.ts diff --git a/packages/ui/src/confidential/inject-hyperlinks.ts b/packages/ui/src/zama/inject-hyperlinks.ts similarity index 100% rename from packages/ui/src/confidential/inject-hyperlinks.ts rename to packages/ui/src/zama/inject-hyperlinks.ts diff --git a/packages/ui/src/confidential/remix.ts b/packages/ui/src/zama/remix.ts similarity index 100% rename from packages/ui/src/confidential/remix.ts rename to packages/ui/src/zama/remix.ts diff --git a/packages/ui/src/confidential/superchain-tooltip.ts b/packages/ui/src/zama/superchain-tooltip.ts similarity index 100% rename from packages/ui/src/confidential/superchain-tooltip.ts rename to packages/ui/src/zama/superchain-tooltip.ts From ca7410e66df95b76ad05dc994210803558b7614e Mon Sep 17 00:00:00 2001 From: Eric Lau Date: Wed, 27 Aug 2025 15:08:34 -0400 Subject: [PATCH 04/46] App switch --- packages/core/zama/src/utils/version.ts | 2 +- packages/ui/public/zama.html | 2 +- packages/ui/src/main.ts | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/core/zama/src/utils/version.ts b/packages/core/zama/src/utils/version.ts index 10ab4ab89..772dea935 100644 --- a/packages/core/zama/src/utils/version.ts +++ b/packages/core/zama/src/utils/version.ts @@ -1,4 +1,4 @@ /** * Semantic version string representing of the minimum compatible version of Contracts to display in output. */ -export const compatibleContractsSemver = '^5.4.0'; +export const compatibleContractsSemver = '^0.2.0'; diff --git a/packages/ui/public/zama.html b/packages/ui/public/zama.html index 1a807839a..257968095 100644 --- a/packages/ui/public/zama.html +++ b/packages/ui/public/zama.html @@ -71,7 +71,7 @@
- +